Hello,
The == will compare just the bit
pattern of address ( some way to get the object), so the false will be printed.
See,
if("Hello".equals("Hello")) sop("true); // ok
if("Hello" == "Hello")System.out.println("Hello"); // ok
but
Byte byte1=new Byte((byte) 23);
Byte byte2=new Byte((byte) 23);
if(byte1.toString() == byte2.toString())
System.out.println("OK");
Thing is the toString() method will not create the String in StringPool but in Stack that to temporary purpose.