long to short java

After knowing primitive data types and Java rules of Data Type Casting (Type Conversion), let us cast long to short as an example. The long takes 8 bytes of memory and short takes 2 bytes of memory. Assigning 8 bytes of memory to 2 bytes of memory requires explicit casting. It is like not possible …

long to short java Read More »