Make your own free website on Tripod.com
 
 

.


: vv .
v . v Unicode v . vv vv . v . , .

. . , vv .

vvv MaxVariablesDemo main v . .
public class MaxVariablesDemo {
    public static void main(String args[]) {

        // v
        byte largestByte = Byte.MAX_VALUE;
        short largestShort = Short.MAX_VALUE;
        int largestInteger = Integer.MAX_VALUE;
        long largestLong = Long.MAX_VALUE;

        //  
        float largestFloat = Float.MAX_VALUE;
        double largestDouble = Double.MAX_VALUE;

        //   vv
        char aChar = 'S';
        boolean aBoolean= true;

        // v vvv
        System.out.println("  byte   " + largestByte);
        System.out.println("  short   " + largestShort);
        System.out.println("  integer   " + largestInteger);
        System.out.println("  long   " + largestLong);

        System.out.println("  float   " + largestFloat);
        System.out.println("  double   " + largestDouble);

        if (Character.isUpperCase(aChar)) {
            System.out.println(" " + aChar + "   v.");
        } else {
            System.out.println(" " + aChar + "   v.");
        }
        System.out.println("aBoolean   " + aBoolean);
     }
}

:

byte 127
short 32767
integer 2147483647
long 9223372036854775807
float 3.40282e+38
double 1.79769e+308
S v.
aBoolean true

vv vv , , , v. MaxVariablesDemo v, vv v MAX_VALUE if-else vv .

MAX_VALUE v Java , .

MaxVariablesDemo if-else v .

[ ] [] []