πŸ“Š JAVA
Q. Which of the following statements is true?
  • (A) The class Exception, which is derived from the class Object, is the superclass of the class Throwable.
  • (B) The class Throwable, which is derived from the class Exception, is the superclass of the class Object.
  • (C) The class Throwable, which is derived from the class Object, is the superclass of the class Exception.
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (C) The class Throwable, which is derived from the class Object, is the superclass of the class Exception.
πŸ“Š JAVA
Q. A message string is returned by which method of an Exception object?
  • (A) printMessage()
  • (B) getMessage()
  • (C) printStackTrace()
  • (D) traceMessage()
πŸ’¬ Discuss
βœ… Correct Answer: (B) getMessage()
πŸ“Š JAVA
Q. When is a finally {} block executed?
  • (A) Only when an exception is thrown by a try block
  • (B) Only when there are no exceptions thrown
  • (C) At the end of a program
  • (D) Always after the execution of a try block, regardless of whether or not an exception is thrown
πŸ’¬ Discuss
βœ… Correct Answer: (D) Always after the execution of a try block, regardless of whether or not an exception is thrown
πŸ“Š JAVA
Q. When does Exceptions in Java arises in code sequence?
  • (A) Run Time
  • (B) Compilation Time
  • (C) Can Occur Any Time
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) Run Time
πŸ“Š JAVA
Q. What is multithreaded programming?
  • (A) It’s a process in which two different processes run simultaneously.
  • (B) Its a process in which two or more parts of same process run simultaneously.
  • (C) Its a process in which many different process are able to access same information.
  • (D) Its a process in which a single process can access information from many sources.
πŸ’¬ Discuss
βœ… Correct Answer: (B) Its a process in which two or more parts of same process run simultaneously.
πŸ“Š JAVA
Q. Which of these are types of multitasking?
  • (A) Process based multitasking
  • (B) Thread based multitasking
  • (C) Both a & b
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (D) None of the mentioned
πŸ“Š JAVA
Q. Which of these packages contain all the Java’s built in exceptions?
  • (A) java.io
  • (B) java.util
  • (C) java.lang
  • (D) java.net
πŸ’¬ Discuss
βœ… Correct Answer: (C) java.lang
πŸ“Š JAVA
Q. Thread priority in Java is?
  • (A) Integer
  • (B) Float
  • (C) Double
  • (D) Long
πŸ’¬ Discuss
βœ… Correct Answer: (A) Integer
πŸ“Š JAVA
Q. What will happen if two thread of same priority are called to be processed simultaneously?
  • (A) Any one will be executed first lexographically
  • (B) Both of them will be executed simultaneously
  • (C) None of them will be executed
  • (D) It is dependent on the operating system.
πŸ’¬ Discuss
βœ… Correct Answer: (D) It is dependent on the operating system.
πŸ“Š JAVA
Q. Which of these statements is incorrect?
  • (A) By multithreading CPU’s idle time is minimized, and we can take maximum use of it.
  • (B) By multitasking CPU’s idle time is minimized, and we can take maximum use of it.
  • (C) Two thread in Java can have same priority
  • (D) A thread can exist only in two states, running and blocked.
πŸ’¬ Discuss
βœ… Correct Answer: (D) A thread can exist only in two states, running and blocked.