public class TypeMaxValue {
public static void main(String args[]){
byte largestByte=Byte.MAX_VALUE;
short largestShort=Short.MAX_VALUE;
int largestInteger=Integer.MAX_VALUE;
long largestLong=Long.MAX_VALUE;
float largerstFloat=Float.MAX_VALUE;
double largerstDouble=Double.MAX_VALUE;
System.out.println("最大的byte值是"+largestByte);
System.out.println("最大的short值是"+largestShort);
System.out.println("最大的 int值是"+largestInteger);
System.out.println("最大的long值是"+largestLong);
System.out.println("最大的float值是"+largerstFloat);
System.out.println("最大的double值是"+largerstDouble);
}
}
第四周作业-键盘输入数据 和 数据类型p22例题2-2
最新推荐文章于 2015-06-21 19:36:13 发布