Java – Type Casting

Type casting is converting one data type to another.
Example:

int x = 10;
double y = (double) x;
System.out.println(y);

No images available.