When assigning f to i by explicit casting i.e., i = (int) f, the most 32 insignificant bits will be assigned to i, bec i can hold at max 32 bits. This is not a correct understanding of what occurs when casting a
float value to an
int. The data type
float is 32 bits, as is the data type
int. A different style of bit
pattern is used for floating point data types than is used for integral data types. When casting from
float to
int, the integer part of the
float value is simply used to create the
int value.
Also note that the floating point literal 444.444 would be considered to be of type
double in
Java.