int to long Java

After knowing primitive data types and Java rules of Data Type Casting (Type Conversion), let us cast int to long. The int takes 4 byte of memory and long takes 8 bytes of memory. Assignment 4 bytes of memory to 8 byte of memory is done implicitly (automatic conversion). byte –> short –> int –> …

int to long Java Read More »