File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Wrapper(==)-Q Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Wrapper(==)-Q" Watch "Wrapper(==)-Q" New topic


Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026

Q: Why Integer.MAX_VALUE is not returning unequal. The rest of things are
evaluating to equal

Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
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

Joined: Mar 13, 2004
Posts: 1272
Please review this thread:

Mike Gershman
SCJP 1.4, SCWCD in process
I agree. Here's the link:
subject: Wrapper(==)-Q
It's not a secret anymore!