Explanation: Vector is synchronized and thread-safe.
Dear candidates you will find MCQ questions of JAVA here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question
Explanation: Vector is synchronized and thread-safe.
Explanation: 'this' refers to the current object instance.
Explanation: NullPointerException is an unchecked exception.
System.out.println(5 + 5 + "5" + 5 + 5);
Explanation: 5+5=10, then string concatenation results in 10555.
Explanation: int is always 4 bytes (32-bit) in Java, regardless of platform.
Explanation: Class metadata is stored in Method Area (part of JVM).
Integer a = 127; Integer b = 127; System.out.println(a == b);
Explanation: Integer cache works for values -128 to 127, so both refer to same object.
Explanation: Threads can be created by extending Thread or implementing Runnable.
Explanation: start() creates a new thread and calls run() internally.
Explanation: Hashtable is synchronized by default.