62,621
社区成员
发帖
与我相关
我的任务
分享
public class HelloWorld{
public static void main(String[] args)
{
int i1= (int)10000000000000L;
System.out.println(i1);
}
}
value > Integer.MAX_VALUE || value < Integer.MIN_VALUElong l =10000000000000L;
if(l > Integer.MAX_VALUE){
throw new Exception("超出int范围");
}else{
System.out.println((int)l);
}