Implicit type casting in java

class P_06_implicit
{
    public static void main(String[] args)
    {
        int i = 100;
        long l = i;
        float f = l;
        System.out.println("Int value "+i);
        System.out.println("Long value "+l);
        System.out.println("Float value "+f);
    }
}

Output


Comments

Popular posts from this blog

To implement the various components of HTML5 Canvas

Program to illustrate the concept of templates.

Program to illustrate the order of execution of constructors and destructors in inheritance.