If you are looking for
The advantages of Type Casting.
Suppose
If you want to the value of int data type variable assigned into the short data type variable. You will get an error.
Offcourse (In general life) its impossible to store full volume of
water filled in a jug into a glass. Whereas we can store the glass water into the jug.
But with type casting it is made possible to assign the values of different type of variables to each other. The larger type to the smaller or smaller to larger. (int to short or int to long, byte to short or short to byte, vice versa) However we may loose some information, like if we pour the water of jug in a glass (if we want to assign the larger value into the smaller type variable).
Read page 43 of Khalid Mughal's book for beginners.
------------------