Tutorial #3 : Data Type Of Conversion



1. Implicit 

    This Process done by java compiler . Conversion of lower to higher datatype.
   
     Example

     short x = 10;
     long y = x;

2. Explicit 

   This Process done by user code . Conversion of higher to lower datatype.

    Example

     long x = 102589;
     short y = (short) x;

3. Final Keyword

    Constant is an entity that may not change during executing which is denoted by Final keyword.

    Example

    final float pi = 3.14f;
    final int months = 12; 

Comments