Description : What will this code print ? String a = new String ("TEST"); String b = new String ("TEST"); if(a == b) { System.out.println ("TRUE"); } else { System.out.println ("FALSE"); }
Last Answer : Ans. FALSE. == operator compares object references, a and b are references to two different objects, hence the FALSE. .equals method is used to compare string object content.