1.switch里面只能是short,int,char,byte的. 【推荐阅读:关于Windows各种SDK下载,这里有】
4.文件里, 8 默认是int, 8.0默认是double 【扩展信息:vs.net2003的"VC软】 3.这种写法outer.inner i = new outer().new inner(); ok! 5.八进制是 0开头,不是o(英文o) 6.byte -128~127 ,-128是二进制的多少? 7. -1>>32还是-1, -1>>>32为什么还是-1? 8. char c=´c´; string s ="s"; s+=c;结果是 sc!!! 9. boolean b1=true; boolean b2=true; system.out.println(b1|b2); 结果是true.编译没错! 10.java的默认import包有哪些? 类与对象(class and object) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0.最外层的类可以声明成final: "$file a":< final class a{}> ok!,但是不能是private与static的. 1.overload是同类里同样的方法名,override是父子的继承 2.override的返回结果必须一样,否则编译错哦the return type of an overriding method is identical to the return type of the method it overrides. 2.1 override的modifier可以扩大,但是不能缩小.比如父类private void test(){} 子类:public void test(){} ,没问题;如果反了,就死翘翘了! 3.super.super(),靠,错的,没这么写的 4.static与非static之间永远无法override! 5. 看程序 public class a{ void test1() throws baseex{hi();} void hi(){system.out.println("say hi,a");} } class aa extends a{ void hi(){system.out.println("say hi,aa");} } class test{ static void main(string b[]) throws exception{ a a = new aa(); a.test1(); } } 结果是,"say hi,aa",这说明什么?说明,方法永远跟着类的原来面目走;而,变量恰恰相反! 6.一个非抽象方法死活也别想override成一个抽象方法 7.override的子类的方法抛出的的异常只能是父类方法抛出异常的子异常类,或者... 下一页