• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help

 
kevin jia
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,gurus
Could anyone explain , why the answer for following question is false.
public class Q9 {
public static void main(String[] args) {
Byte b1 = new Byte("127");
if(b1.toString() == b1.toString()) {
System.out.println("True");
} else {
System.out.println("False");
}
}
}
thanks !
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the exact same discussion here and here!
Ajith
 
kevin jia
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Ajith.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic