Click To Zoom Image |
Data-Type conversion-Implicit
& Explicit Conversion
& Explicit Conversion
Implicit Conversion -Done By The Compiler
When There is No Loss Of Information and
No Possibility Of Throwing Exception During
The Conversion
When There is No Loss Of Information and
No Possibility Of Throwing Exception During
The Conversion
Example-Converting int into Float
(Small into large Datatype)
(Small into large Datatype)
While Converting Float into int data type ,
We lose the Fractional
in this case Explicit Conversion is required
We lose the Fractional
in this case Explicit Conversion is required
Click To Zoom Image |
Explicit Conversion is done by 2 Ways
1-Cast Operator
2-Convert