2. local varibles必须赋初值,不然会有compiling error
3. "+"有连接string的功能 print("s"+3+4) output: s34
print(3+4+"s") output:7s
4. while(x=y){} is illegal in java, unless x and y are bool type.
5. access array is easier
float f[] = new float[10];
for(float x:f){
x = 3;
}
6. Random generator.
Random generator = new Random();
int i = generator.nextInt(4);
7.一个class有static先run static的,并且按照顺序,只初始化一次
8.java不能用super.super, 要access grandparent必须通过parent
9.protected类型变量和函数只能被继承类使用
10.多态性. fields and static methods没有多态性,也就是说一旦被super cast就会用super class的value和method
11.interface也可以被继承 fields in interface all static and final
12.初始化一个int list
List s = Arrays.asList(2,2,3,2,2);
[imageId]
[/imageId]