just go through the
java doc.
In your first code 11 is "int" that is default type for integer type and there is constructor defined which take "int" and "int" is not automatically converted into byte .
if you change your code to
Byte y = new Byte((byte)11);// compiles fine
second code is perfectly fine
there is a constructor defined
Float(double value) in API just go through it.
Regards,
Abdul Mohsin