• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wrapper(==)-Q

 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Q: Why Integer.MAX_VALUE is not returning unequal. The rest of things are
evaluating to equal
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Each statement should return 'equal' because everything ( long , int , char , short , byte ) can be cast into double & float without lossing precision .
 
Mike Gershman
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please review this thread:
http://www.coderanch.com/t/247377/java-programmer-SCJP/certification/Wrapper
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic