Home / Programming MCQs / JAVA MCQs / Question
P
Q. What is the output of the following code?
String name = null; System.out.println(“Hello, ” + name + “!”);
Explanation:
When a null reference is concatenated with a string, it is treated as the string “null”. So the output of this code is “Hello, null!”.
You must be Logged in to update hint/solution
A SWITCH fall through occurs in Java only in the absence of ___.
Which of these is an incorrect array declaration?
An object is created at __ time in Java.
Is Session a thread-safe object?
The capacity if StringBuffer is defined as _________.
What is the output of the Java program below?
Which of these is an instance variable of httpd that is a Hashtable?
Discusssion
Login to discuss.