强类型语言
要求所有变量的使用要严格符合规定,所有变量都必须先定义才能使用
弱类型的语言
Java数据类型分类
基本类型(primitive type)
引用类型(reference type)
使用方法如下:
public class demo01 {
public static void main(String[] args){
int num1 = 10;
byte num2 = 20;
short num3 = 30;
long num4 = 30L;
//小数 ;浮点
float num5 = 50.1F;
double num6 = 3.1415952;
//字符串
String a = "hello world";
//字符
char b = 'h';
boolean flag = true;
System.out.println(a);
System.out.println(num1);
}
}
后续会继续更新请持续关注,。。。。。。。。。。。。。。



