Quick actions

cmd+k|ctrl+k

Navigation

Languages

Primitive Data Types

Snippet info

Language

Java

Visibility

public

Author

taptorestart

Created

2020-10-18T13:16:20Z

Updated

2020-10-18T13:51:14Z

class Main {
    public static void main(String[] args) {

        byte bA = 127; 
        byte bB = -128; 
        short sA = 32767;
        short sB = -32768;
        int iA = 2147483647;
        int iB = -2147483648;
        long lA = 9223372036854775807L;
        long lB = -9223372036854775808L;
        float fA = 3.40282347E+38f;
        float fB = -3.40282347E+38f;
        double dA = 1.79769313486231570E308d;
        double dB = -1.79769313486231570E308d;
        boolean boolA = true;
        boolean boolB = false;
        char cA = '\u0000';
        char cB = '\uffff';
        
        System.out.println("bA:" + bA);
        System.out.println("bB:" + bB);
        System.out.println("sA:" + sA);
        System.out.println("sB:" + sB);
        System.out.println("iA:" + iA);
        System.out.println("iB:" + iB);
        System.out.println("lA:" + lA);
        System.out.println("lB:" + lB);
        System.out.println("fA:" + fA);
        System.out.println("fB:" + fB);
        System.out.println("dA:" + dA);
        System.out.println("dB:" + dB);
        System.out.println("boolA:" + boolA);
        System.out.println("boolB:" + boolB);
        System.out.println("cA:" + cA);
        System.out.println("cB:" + cB);
        
        System.out.println(Byte.MIN_VALUE);
        System.out.println(Byte.MAX_VALUE);
        System.out.println(Short.MIN_VALUE);
        System.out.println(Short.MAX_VALUE);
        System.out.println(Integer.MIN_VALUE);
        System.out.println(Integer.MAX_VALUE);
        System.out.println(Long.MIN_VALUE);
        System.out.println(Long.MAX_VALUE);
    }
}
INFO