Home / Programming MCQs / JAVA MCQs / Question
P
Q. What is the output of the following code?
String name = “John”; System.out.println(“Hello, ” + name + “!”);
Explanation:
The string concatenation operator (+) combines the string “Hello, ” with the value of the name variable (which is “John”) and the string “!”, resulting in the output “Hello, John!”.
You must be Logged in to update hint/solution
Which of the following operator in Java have context dependent meaning
______ statement in java is multiway branch statement.
Which of these is used to perform all input & output operations in Java?
What is the maximum number of levels possible in a Multilevel Inheritance in Java?
Which one returns the smallest whole number greater than or equal to x is
Which of these statement is correct?
Variables declared within a method or block are called
Discusssion
Login to discuss.