Handling datatypes in java

class P_05_datatypes
{
    public static void main(String args[])
    {
        char a = 'G';
        int i=89;
        byte b = 4;
        short s = 56;
        double d = 4.355453532;
        float f = 4.7333434f;
        System.out.println("char: " + a);
        System.out.println("integer: " + i);
        System.out.println("byte: " + b);
        System.out.println("short: " + s);
        System.out.println("float: " + f);
        System.out.println("double: " + d);
    } 
}

Output





Comments

Popular posts from this blog

To create an html page with frames and frameset

1. Write a program to insert a new element at end as well as at a given position in an array in Java

1. To familiarize with network devices like switch, hub, routers and bridges in LaTex