使用long创建日期对象时未解决的编译:Java

我尝试了以下代码。

System.out.println(new Date(1268234290000)); 

它抛出exception

 Exception in thread "main" java.lang.Error: Unresolved compilation problem: The literal 1268234290000 of type int is out of range 

怎么解决?

因为它是一个很长的值附加L

  System.out.println(new Date(1268234290000L)); 

Java语言规范

如果整数文字后缀为ASCII字母L或l(ell),则整数文字的长度为long; 否则它的类型为int(§4.2.1)。