基本数据类型
char,string,boolean,int,float,double,short,byte,long
数组
数组在java中是引用类型,对数组的改变不会影响其本身
int[] ns = { 68, 79, 91, 85, 62 };
for (int i = 0; i < ns.length; i++) {
System.out.println(ns[i]);
// 68 79 91 85 62
}
ns = new []int {1,2,3}
此时ns数组的内容变为1,2,3;之前的5个变量都将无法访问