学习笔记(08):Java小白修炼手册-Java数据如何存取,论道Java数据类型

立即学习:https://edu.csdn.net/course/play/27274/361058?utm_source=blogtoedu

1.了解Java数据类型

  • 当创建变量时,需要申请内存空间
  • 系统根据变量的数据类型,来分配空间大小

2.Java数据类型有哪些

3.Java数据类型实例

public class Demoe3{
public statie void main(string[] args) {
boolean flag = true; 
flag false;
//byte b = 128;
byte b = 30;
short s = 1000; 
int i = 10000;
 long 1 =23232323; 
float f-3.14F; 
double d = 3.14; 
char c= 'a'; 
System. out. printin((int)c);
System. out. printIn(Byte. MIN_VALUE+","+Byte. MAX_VALUE+", "+Byte. SIZE);//查看最小值和最大值
System. out. printin(Long. MIN_VALUE+", "+Long. MAX_VALUE+", "+Long. SIZE);
}
}
发布了12 篇原创文章 · 获赞 1 · 访问量 102

猜你喜欢

转载自blog.csdn.net/weixin_43186090/article/details/104228866
今日推荐