1public class MaxVariables
 2{
 3  public static void main(String[] args)
 4  {
 5    byte largestByte=Byte.MAX_VALUE;
 6    short largestShort=Short.MAX_VALUE;
 7    int largestInteger=Integer.MAX_VALUE;
 8    long largestLong=Long.MAX_VALUE;
 9    float largestFloat=Float.MAX_VALUE;
10    double largestDouble=Double.MAX_VALUE;
11    char aChar='S';
12    boolean aBoolean=true;
13    
14    System.out.println("最大的byte值是:"+largestByte);
15    System.out.println("最大的short值是:"+largestShort);
16    System.out.println("最大的integer值是:"+largestInteger);
17    System.out.println("最大的long值是:"+largestLong);
18    System.out.println("最大的float值是:"+largestFloat);
19    System.out.println("最大的doubble值是:"+largestDouble);
20    if(Character.isUpperCase(aChar))
21    {
22      System.out.println("字符"+aChar+"是大写字母");
23    }

24    else
25    {
26      System.out.println("字符"+aChar+"是小写字母");
27    }

28    System.out.println("布尔型变量的值是"+aBoolean);
29  }

30}