To specify a long literal, you can append an upper-or lowercase L to the literal.
For example, 0x7ffffffffffffffL or 987654321234567899876L.
public class Main {
public static void main(String args[]) {
long l = 0x7ffffffffffffffL;
System.out.println("l is " + l);
}
}
The output generated by this program is shown here:
l is 576460752303423487java2s.com | | Contact Us | Privacy Policy |
| Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
| All other trademarks are property of their respective owners. |