总结
这份面试题几乎包含了他在一年内遇到的所有面试题以及答案,甚至包括面试中的细节对话以及语录,可谓是细节到极致,甚至简历优化和怎么投简历更容易得到面试机会也包括在内!也包括教你怎么去获得一些大厂,比如阿里,腾讯的内推名额!
某位名人说过成功是靠99%的汗水和1%的机遇得到的,而你想获得那1%的机遇你首先就得付出99%的汗水!你只有朝着你的目标一步一步坚持不懈的走下去你才能有机会获得成功!
成功只会留给那些有准备的人!
1.经过对原作者的例子改造
package mwq;
public class T1 {
public static void main(String[] args) {
boolean b = true;
try {
b = tb1();
} catch (ArithmeticException e) {
System.out.println("main catch the value of b : " + b);
b = false;
throw e;
} finally {
System.out.println("main finally b : " + b);
}
}
public static boolean tb1() throws ArithmeticException {
boolean b = true;
try {
if (!tb2()) {
return false;
}
} catch (ArithmeticException e) {
System.out.println("tb1 catch the value of b : " + b);
b = false;
throw e;
} finally {
System.out.println("tb1 finally b : " + b);
}
return b;
}
@SuppressWarnings(“finally”)
public static boolean tb2() throws ArithmeticException {
boolean b = true;
try {
System.out.println(1 / 0);
} catch (ArithmeticException e) {
System.out.println("tb2 catch the value of b : " + b);
b = false;
throw e;
} finally {
System.out.println("tb2 finally b : " + b);
return b;
}
}
}
2.我自己感觉有意思的例子
package mwq;
public class T {
public static void main(String[] args) {
try {
System.out.println(1 / 0);
System.out.println(“ccccccccccccccccccc”);
} catch (ArithmeticException e) {
System.out.println(1 / 0);
System.out.println(“aaaaaaaaaaaaaaaaaaa”);
} finally {
最后
】](https://bbs.csdn.net/forums/4f45ff00ff254613a03fab5e56a57acb)收录**