float to int Java

After knowing primitive data types and Java rules of Data Type Casting (Type Conversion), let us cast float to int. By memory-wise, both take 4 bytes of memory. Even then, it requires explicit casting as a float carries a mantissa (value after decimal point) where as int does not. In explicit casting, mantissa part is …

float to int Java Read More »