Explanatory Question
What are the types of casting shown by the following examples?
-
double x = 15.2;
int y = (int) x; -
int x = 12;
long y = x;
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.