long java code example

Example 1: short java

short numberMin = -32768;
short numberMax = 32767;

Example 2: java long literal

to declare a Long literal in java, add 'L' to the end of
an integer literal

examples:
12312345514316L
59741316635446100055330L
465414966143L

Example 3: max long value java

/**
 * A simple application that looks up the value of Long.MAX_VALUE and outputs it to the user.
 **/
public class Test {
	public static void main(String[] args) {
		System.out.println("The maximum Long value is: "+Long.MAX_VALUE);
	}
}

Tags:

C Example