String a ="meow"; a = a +"deal"; String b = "meowdeal"; if(a==b) System.out.println("true"); else System.out.println("false "+a.hashCode()+" b hash "+b.hashCode()); Here b should contain same reference as a.then if should be executed.but y else condition is getting executed.Please explain | 0 |