explicit use of l for Long,D for Double,,F for Float in autoboxing
Byte byte1=10;
Short short1=20;
Integer integer=30;
In the above code autoboxing happens successfully see the below code here
I am doing casitng explicitly because It is taking 20 as integer numeric
literal by default.
Byte byte1=new Byte((byte) 20);
Short short1=new Short((short) 20);
but see the below code , I have to use l,f and d explicitly without this
it is showing error........what is the reason behind it.I am not getting
it.
Long long1=40l;
Float float1=50f;
Double double1=60d;
No comments:
Post a Comment