`
文章列表
循环的优化 --------------------------------------- 1,数字比较尽量和0比较 注释:计算机喜欢0和1 //foo for(int i=0;i<Integer.MAX_VALUE;i++){ //慢 } //优化 for(int i=Integer.MAX_VALUE;i>0;i--){ //快 } 2,尽量把异常捕获写在外面 //foo for(int i=180000;i>=0;i--){ try{ //慢 }catch{ } } ...
class Parent { public Parent() { callMethod(); } public void callMethod() { System.out.println("我是父类里的方法"); } } class Child extends Parent{ int a; public Child() { /** * 这里是我猜想--- * 编译器编译的时候在这里插入 * super(); * 因为super()只是sun用于引用本类的父类一个 ...
Global site tag (gtag.js) - Google Analytics