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

Example of Synopsis in LaTeX

Program to display the different colors using the switch statement.

Program to illustrate the concept of templates.