String a = "Hello World";
String b = "Hello World";
System.out.println(a.equals(b));
System.out.print(a==b);
System.out.print(a == b.intern());

What would be output?

Options
- Compile time error
- True false false
- true false true
- true true true


CORRECT ANSWER : true true true

Write your comments

 
   
 
 

Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement