import com.sun.org.apache.xpath.internal.operations.Bool;

public class Demo2 {
    public static void main(String[] args) {
        int num = 10;
        System.out.println(num);
        //八大基本数字类型
        //byte -128~127
        int num1 = 10;
        byte num2 = 20;
        short num3 = 30;
        long num4 = 40L;//long类型要在数字后加L
        float num5 = 50.1F;//flost类型要在数字后面加f
        double num6 = 3.1415;
        boolean flag = true;
        char name = 'A';
        //String不是关键字,是一种类
    }
}

 

posted on 2022-07-21 12:04  na2co3-  阅读(28)  评论(0)    收藏  举报