Java / Using String
What is the output of this statement?
System.out.println ("A"=="A");
System.out.println ("A"=="A");
The above statement prints true. The first string literal creates an object in the string pool which is returned later for the second literal. The references are same and hence true.
More Related questions...