aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes puzzle about equals Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "puzzle about equals" Watch "puzzle about equals" New topic
Author

puzzle about equals

pamela lee
Greenhorn

Joined: Jul 01, 2002
Posts: 14
Integer i= new Integer(4);
if i use i.equals(4),what process will do?
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
i.equals(4) will not compile because the equals method only accepts Objects and not primitive values.


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: puzzle about equals