Explicit type casting in java

class P_06_explicit
{
    public static void main(String[] args)
    {
        double d = 100.04;
        long l = (long)d;
        int i = (int)l;
        System.out.println("Double value "+d);
        System.out.println("Long value "+l);
        System.out.println("Int value "+i);
    }
}

Output


Comments

Popular posts from this blog

Program to illustrate the concept of templates.

To configure the IP address for a computer connected to LAN

Write a menu driven program to perform insertion and deletion operations in a single linked list