In Java, the long keyword is used to declared a variable as a numeric type. A long value can hold a 64-bit integer number which ranges from -263 to 263 - 1. For example:

long amount;

The long keyword can be used to declared return type of a method as well:

public long getAmount() {
    return amount;
}

 

See all keywords in Java.

Related Topics:

 

Other Recommended Tutorials:


About the Author:

is certified Java programmer (SCJP and SCWCD). He started programming with Java in the time of Java 1.4 and has been falling in love with Java since then. Make friend with him on Facebook and watch his Java videos you YouTube.



Add comment

   


Comments 

#1Anonymous2016-01-09 23:18
Awesome.
Quote