πŸ“Š JAVA
Q. Which of these classes is used for input and output operation when working with bytes?
  • (A) InputStream
  • (B) Reader
  • (C) Writer
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) InputStream
πŸ“Š JAVA
Q. Which of these class is used to read and write bytes in a file?
  • (A) FileReader
  • (B) FileWriter
  • (C) FileInputStream
  • (D) InputStreamReader
πŸ’¬ Discuss
βœ… Correct Answer: (C) FileInputStream
πŸ“Š JAVA
Q. Which of the interface contains all the methods used for handling thread related operations in Java?
  • (A) Runnable interface
  • (B) Math interface
  • (C) System interface
  • (D) ThreadHandling interface
πŸ’¬ Discuss
βœ… Correct Answer: (A) Runnable interface
πŸ“Š JAVA
Q. Which of these exceptions will be thrown if we use null reference for an arithmetic operation?
  • (A) ArithmeticException
  • (B) NullPointerException
  • (C) IllegalAccessException
  • (D) IllegalOperationException
πŸ’¬ Discuss
βœ… Correct Answer: (B) NullPointerException
πŸ“Š JAVA
Q. Which of these methods of a Thread class is used to suspend a thread for a period of time?
  • (A) sleep()
  • (B) terminate()
  • (C) suspend()
  • (D) stop()
πŸ’¬ Discuss
βœ… Correct Answer: (A) sleep()
πŸ“Š JAVA
Q. Which of this method of class String is used to obtain a length of String object?
  • (A) get()
  • (B) Sizeof()
  • (C) lengthof()
  • (D) length()
πŸ’¬ Discuss
βœ… Correct Answer: (D) length()
πŸ“Š JAVA
Q. Which of these packages contains the exception Stack Overflow in Java?
  • (A) java.lang
  • (B) java.util
  • (C) java.io
  • (D) java.system
πŸ’¬ Discuss
βœ… Correct Answer: (A) java.lang
πŸ“Š JAVA
Q. Which of these operators is used to allocate memory for an object?
  • (A) malloc
  • (B) alloc
  • (C) new
  • (D) give
πŸ’¬ Discuss
βœ… Correct Answer: (C) new
πŸ“Š JAVA
Q. How to copy contents of array?
  • (A) System.arrayCopy()
  • (B) Array.copy()
  • (C) Arrays.copy()
  • (D) Collection.copy()
πŸ’¬ Discuss
βœ… Correct Answer: (A) System.arrayCopy()
πŸ“Š JAVA
Q. which of the following can be operands of arithmetic operators?
  • (A) Numeric
  • (B) Boolean
  • (C) Characters
  • (D) Both Numeric & Characters
πŸ’¬ Discuss
βœ… Correct Answer: (D) Both Numeric & Characters