Java long Keyword

Java long Keyword


Long Keyword In Java
The long data type can store whole numbers from -9223372036854775808 to 9223372036854775807. This is used when int is not large enough to store the value. We must put L keyword after every value we are assigning to a long type variable otherwise it will through an error.
Example-
short num =400000000L;
System.out.println(num);