当不知道基本数据类型的取值范围时,可以通过max_value等来查询

public class Demo03{
public static void main(String[] args){
System.out.println("int MAX "+Integer.MAX_VALUE);
System.out.println("int MIN "+Integer.MIN_VALUE);
}
}

 

原文地址:https://www.cnblogs.com/1020182600HENG/p/5859036.html