To indicate a long (64-bit) literal, append the suffix L to the literal expression. : long « Java Source And Data Type « SCJP

Home
SCJP
1.Java Source And Data Type
2.Operators
3.Modifiers
4.Type Casting
5.Statements
6.Object Oriented
7.Thread
8.Utility Classes
9.File
SCJP » Java Source And Data Type » long 
1.13.1.To indicate a long (64-bit) literal, append the suffix L to the literal expression.
//By default, an integral literal is a 32-bit value. 
public class MainClass {
  public static void main(String[] argv) {
    long aLongValue = 100L;
    aLongValue = 100l// lower case is legal but hard to read

    System.out.println(aLongValue);
  }
}
1.13.long
1.13.1.To indicate a long (64-bit) literal, append the suffix L to the literal expression.
1.13.2.Require a specific (int) cast for int n2 = 4096L
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.