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
posted
0
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.