8.10. The Casting Operator

Chapter 7 notes that explicit conversions of a larger data type to a smaller data type require casting. Casting is done using the () operator. For example:

long a = 1000L;
int b = (int) a;

Here, the casting operator is used to cast a long a to an int b.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.103.183