public class Demo02 {
public static void main(String[] args) {
//八大基本数据类型
//整数
byte num = 10;
short num1 = 1111;
int num2 = 249174555; //最常用
long num3 = 6276925782752L; //Long类型要在数字后面加L
System.out.println(num);
System.out.println(num1);
System.out.println(num2);
System.out.println(num3);
//小数
float num4 = 100.3F; //float类型要在数字后面加上F
double num5 = 3.14232352523532;
System.out.println(num4);
System.out.println(num5);
//字符 只允许输入一个字符
char name = '中';
System.out.println(name);
//字符串
String name1="haha";//字符串,String不是关键字
System.out.println(name1);
//布尔值 : 是 非
boolean flag = true;
boolean flag1 = false;
System.out.println(flag);
System.out.println(flag1);
}
}