Sunday, 8 October 2017

Type Casting || Type Conversion in Java


In many expression, we generally assign some values or variables to other variables. These variables should be compatible with each other. In Java, before assigning the value to a variable, if their type is not same, type conversion is necessary. The type casting can be done in two way:

1) Implicit (Automatic)
2)Explicit

The Implicit type conversion takes place automatically when the type is compatible and the destination type is larger than the source type.

When in an expression the destination type is not larger than the source code type, the conversion will not be clone automatically, but we have to do it explicitly by type casting.


Type Casting in java, java typecasting, type conversion, java type conversion, types of type casting, implicit, explu=icit

Popular posts