What is the Type casting ?
We often encounter situation where there is a need to store a value of one type into a variable of another type in such situation we must cast the value to be store by processing with the type name is parenthesis.
The syntax will be type variable 1=(type)variable2.
Int m=50;
Byte n=(byte)m;
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment