aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes wrapper class constructors........ Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "wrapper class constructors........" Watch "wrapper class constructors........" New topic
Author

wrapper class constructors........

veesam sridhar
Ranch Hand

Joined: Oct 18, 2005
Posts: 51
hi guys,

I have a doubt on wrapper class constructors.

For Float wrapper class the constructor is overloaded for taking float,double,string types .But in Bertbates book it is written like Float constructor overloaded to take float and string types only.......

plz give some clarification on this.

Thanks in advance
Sridhar.Veesam
Prad Schikanov
Ranch Hand

Joined: Feb 28, 2006
Posts: 47
Yeap, Float wrapper class in java.lang package has 3 constructors as follows. I think this is how it happens.

1. public Float(double value) {

this((float) value);

}


2. public Float(float value) {

//stuff here

}


3. public Float(String s) {

//stuff here

}

Your point is exactly correct. It is a mistake in the K&B book.

Regards,
Priyanka.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: wrapper class constructors........
 
Similar Threads
Wrapper Classes
Wrapper classes
Doubt regarding Wrapper Constructor
Constructor Arguments for Wrapper Class Float
Wrappere question