Type casting programs in Java | Core Java Tutorials

This Core Java Tutorials  “Type casting programs in java” providing examples to understand implicit casting and explicit casting in java.


 

Implicit Casting:

  • The following program explains clearly what is implicit casting.
  • Converting byte datatype into int data type.

 

Converting character datatype into int data type:

 

 

Explicit Casting:

  • The following program explains clearly what is explicit casting.
  • Converting int datatype into byte data type manually.

 

Converting int datatype into character data type manually:

 

Share this