From what I know these are widening primitive conversions:
byte ->to short, int, long, float, or double
short ->to int, long, float, or double
char ->to int, long, float, or double
int ->to long, float, or double
long ->to float or double
float ->to double
I have tried :
class
Testing {
public static void main(
String[] args) {
int i = 1234567899;
float j = i;
System.out.println(i-(int)j);
}
}
Guess what : The output is -37
How this is happening ?