java中一共包含八种基本数据类型
char、byte、short、int、float、double、boolean、long
char a = "A";
byte b = 0;
short s = 1;
int i = 10;
float f = 10.2;
double d = 10.22;
boolean b = true;
long l = 10000l;
常用的有:int 、 float 、double、boolean、long
用来定义数字或者小数或者布尔值
char、byte、short、int、float、double、boolean、long
char a = "A";
byte b = 0;
short s = 1;
int i = 10;
float f = 10.2;
double d = 10.22;
boolean b = true;
long l = 10000l;
常用的有:int 、 float 、double、boolean、long
用来定义数字或者小数或者布尔值
本文标题:第三讲 基本数据类型
本文链接:https://www.haomeiwen.com/subject/gkfazhtx.html
网友评论