long to int Java
After knowing primitive data types and Java rules of Data Type Casting (Type Conversion), let us cast long to int. The long takes 8 bytes of memory and int take 4 bytes of memory. Assigning 8 bytes of memory to 4 bytes of memory requires explicit casting. byte –> short –> int –> long –> …