java literals

www.l‮iruttua‬.com
java literals

In computer science, a literal is a notation for representing a fixed value in source code.

public class Test {
    public static void main(String[] args)
    {
        float a = 101.230; // decimal-form literal
        float b = 0123.222; // It also acts as decimal literal
        float c = 0x123.222; // Hexa-decimal form
		int i = 123;
		float f = 123.123f;
		double d = 3.1415926;
		
		boolean b = true;
		
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
    }
}
Created Time:2017-09-26 17:34:58  Author:lautturi