Hi Bin,
Byte b2=new Byte(1);
--> gives compiler error because the constructor of Byte accepts either
string or byte types, here you are passing an integer value( unless you specify 1 is an integer)
so if you modify Byte b2=new Byte(b1); it will work.
Short s2=new Short(1);
--> same as 1st case.
float f1= 1.0;
--> suffix "f" is always required on a float literal. otherwise it is double so compiler error will occur
Float f2=new Float(1.0); //compile
--> it compiles because the constructor accepts either float or double. here 1.0 is considered as double so no error occurs.
Hope this helps,
Vanitha.
[This message has been edited by Vanitha Sugumaran (edited June 05, 2001).]