class Prim{
void Call(float f){
System.out.println(f);
}
}
class Scr{
public static void main(
String[] argv){
long ty =67L;
new Prim().Call(ty);
}
}
/*When i ran above code it runs well .........? but WHY???
As i know there is Widening Conversion done explicitly.
When
1. Target type is wide enough.
2. Target and source is compitable
Am i right???
in my case source is long(64) and target if float(32) and it still widening .....?
also Why i cannot assign float value to long(without casting) but converse is true ?
Pls help me out......
Regards
Yogesh Sood(India)*/
//Another problem
byte b1=2*2;//1
byte b2=2;//2
b2*=2;//3
/*why line 1 result in error i know that expression is promoted to int and to
do Narrowing conversion u have to do Explicit Casting....
Am i right.....
but what happen to line 3 is it the expression is not promoted to int.......?
pls help me out;
Regards
Yogesh Sood(India)
*/