It is defined in the type promotion rule for java that long data can be casted into float data type. how it is possible??
for example :
class casting{
void show(float a){
System.out.println("float");
}
public static void main(String args[]){
casting obj = new casting();
obj.show(10l);
}
}
but here output is flaot How the long data which is 8 byte are converted into float data(4 byte)?