java type conversion

float to int Java

After knowing primitive data types and Java rules of Data Type Casting (Type Conversion), let us cast float to int. By memory-wise, both take 4 bytes of memory. Even then, it requires explicit casting as a float carries a mantissa (value after decimal point) where as int does not. In…

Java Data Type Casting Type Conversion

Java Data Type Casting Type Conversion Summary: By the end of this tutorial "Java Data Type Casting Type Conversion", you will be comfortable with converting one data type to another either implicitly or explicitly. Java supports two types of castings – primitive data type casting and reference type casting. Reference…