Programming MCQS - QUESTION DETAILS

What is the output of System.out.println("Java" == "Java");?
A. true
B. false
C. Compile error
D. Runtime error

String literals with the same content are interned, so "Java" == "Java" is true.

Similar Questions

What is the purpose of the 'union' keyword in C?






What is the purpose of the 'volatile' keyword in C?






Which method is called automatically when an object is garbage collected?






How is a preprocessor directive indicated in C?






What is the output of printf("%f", 10 / 3);?






How do you declare an array of function pointers in C?






Which function is used to compare two strings in C?






What is the purpose of the 'this' keyword in Java?






How do you achieve multiple inheritance in Java?






What is the purpose of the 'do-while' loop in C?