int to char Java

After knowing primitive data types and Java rules of Data Type Casting (Type Conversion), let us cast int to char. The int takes 4 bytes of memory and char takes 2 bytes of memory. Assignment of 4 bytes of memory to 2 bytes of memory requires explicit casting. Moreover, int can take negative values and …

int to char Java Read More »