java long literal

Solutions on MaxInterview for java long literal by the best coders in the world

showing results for - "java long literal"
Isabell
26 Feb 2016
1public class Test {
2    public static void main(String[] args)
3    {
4        float a = 101.230; // decimal-form literal
5        float b = 0123.222; // It also acts as decimal literal
6        float c = 0x123.222; // Hexa-decimal form
7        System.out.println(a);
8        System.out.println(b);
9        System.out.println(c);
10    }
11}
Domenico
13 Feb 2017
1to declare a Long literal in java, add 'L' to the end of
2an integer literal
3
4examples:
512312345514316L
659741316635446100055330L
7465414966143L