public class Demo03 {
public static void main(String [] args){
//整数
byte num1 =1;
short num2 =3434;
int num3 =244354354;
//最常用
long num4=34432434232432l;
//为了表示区分 在long的数字后面加一个l
//小数:浮点数
float num5= 23.323f;
//在float 后面加一个f
double num6= 314314.341515315;
//字符
char name =‘杨‘;
//字符串String 不是关键字,类
String a ="李波";
//布尔值: 是非
boolean b=true;
boolean c=false;
}
}
原文:https://www.cnblogs.com/yahhh/p/15252929.html