File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes need explanation on wrapper class 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 "need explanation on wrapper class" Watch "need explanation on wrapper class" New topic
Author

need explanation on wrapper class

praveen kumar
Greenhorn

Joined: Sep 02, 2005
Posts: 4
can anyone explain me the output of the follwing program:
public class Test{
public static void main(String args[]){
Byte b1=new Byte("1");
if(b1.toString()==b1.toString())
System.out.println("true");
else
System.out.println("false");

Byte b=new Byte("19");
if(b.toString()==b.toString())
System.out.println("true");
else
System.out.println("false");

}
}

The output is:
true
false
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
HI

CHECK OUT this link...

http://www.coderanch.com/t/250475/java-programmer-SCJP/certification/toString-Integer-class


Regards
 
wood burning stoves
 
subject: need explanation on wrapper class