float to char Java

After knowing primitive data types and Java rules of Data Type Casting (Type Conversion), let us cast float to char. By memory-wise, float takes 4 bytes of memory and char takes 2 bytes of memory. Assignment of 4 bytes value to 2 bytes value requires explicit casting. Moreover, float can take a negative value, but …

float to char Java Read More »