暂未整理...
+
基本数据类型:
八大基本数据类型:对应的引用类型
byte 8位 (1个字节) 2^8
short 16位 (2个字节) 2^16
int 32位 (4个字节) -2^31~2^31-1
long 64位 (8个字节)->800L
float 32位 (4个字节)->2.3F
double 64位 (8个字节)-> 2b
char 16位 (2个字节)->int boolean 8位 (一个字节)
+
结构:
逻辑运算符 &&,||,&,|的短路情况
三目表达式 xxx?a:b
分支结构 if{}else{},switch(){case:1break,defult:}
循环结构 for(;;){} while(){},do{}while() .....
+
数组:
数组: 数组是一个存储在相连位置的数据,所以它的大小不方便改变
Two[] two1=new Two[3];//[]{,,}
two1[0]=new Two(10);
two1[1]=new Two(2);
two1[2]=new Two(3);
System.out.println(Arrays.toString(two1));
Two[] two2=Arrays.copyOf(two1, two1.length+1);
//扩容
two2[3]=new Two(4);
System.out.println(Arrays.toString(two2));
System.arraycopy(two1, 0, two2, 1, two1.length);
System.out.println(Arrays.toString(two2));
+
注释:
单行注释://SOSO
多行注释:/*I WANT YOU*/
文本注释:/**METHOD*/