Conversion means converting the data type into another data type. There are two types of conversion:

  • Widening Conversions: It converts the small byte data types into long byte data types. Examples

byte ----> short, int, long, float.

int ----> long, float, double

float ----> double

  • Narrowing conversions

short ---->byte

int -----> short, byte

double ----> float