πŸ“Š JAVA
Q. Which method executes only once
  • (A) start() method
  • (B) init() method
  • (C) stop() method
  • (D) destroy() method
πŸ’¬ Discuss
βœ… Correct Answer: (B) init() method
πŸ“Š JAVA
Q. Thread class is available in
  • (A) java.io package
  • (B) java.lang package
  • (C) java.awt package
  • (D) java.util package
πŸ’¬ Discuss
βœ… Correct Answer: (B) java.lang package
πŸ“Š JAVA
Q. Minimum threads in a program are
  • (A) 1
  • (B) 2
  • (C) 5
  • (D) Many
πŸ’¬ Discuss
βœ… Correct Answer: (A) 1
πŸ“Š JAVA
Q. Interfaces helps in which type of inheritance
  • (A) Multiple inheritance
  • (B) Multilevel inheritance
  • (C) Hierarchical inheritance
  • (D) None of above
πŸ’¬ Discuss
βœ… Correct Answer: (A) Multiple inheritance
πŸ“Š JAVA
Q. Which of these values is returned by read () method is end of file (EOF) is encountered?
  • (A) 0
  • (B) 1
  • (C) -1
  • (D) Null
πŸ’¬ Discuss
βœ… Correct Answer: (C) -1
πŸ“Š JAVA
Q. Which of these exception is thrown by close () and read () methods?
  • (A) IOException
  • (B) FileException
  • (C) FileNotFoundException
  • (D) FileInputOutputException
πŸ’¬ Discuss
βœ… Correct Answer: (A) IOException
πŸ“Š JAVA
Q. Which exception is thrown by the read ( ) method of input stream class?
  • (A) Exception
  • (B) ClassNotFoundException
  • (C) read Exception
  • (D) IOException
πŸ’¬ Discuss
βœ… Correct Answer: (D) IOException
πŸ“Š JAVA
Q. What garbage collection in the context of java?
  • (A) The operating system periodically deletes all of the java files available on the system.
  • (B) Any package imported in a program and not used in automatically deleted.
  • (C) When all references to an object are gone, the memory used by the object is automatically reclaim
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (C) When all references to an object are gone, the memory used by the object is automatically reclaim
πŸ“Š JAVA
Q. In order for a source code file, containing the public class test, to successfully compile, which of the following must be true?
  • (A) It must have a package statement
  • (B) It must be named test.java
  • (C) It must import java.lang
  • (D) It must declare a public class named test.
πŸ’¬ Discuss
βœ… Correct Answer: (B) It must be named test.java
πŸ“Š JAVA
Q. Which of the following are true about the Error and Exception classes?
  • (A) Both classes extend throwable
  • (B) The error class is final and exception class is not.
  • (C) The Exception class is final and the Error is not.
  • (D) Both classes implement Throwable
πŸ’¬ Discuss
βœ… Correct Answer: (A) Both classes extend throwable