- 1
- 0
- 约6.27千字
- 约 19页
- 2026-09-29 发布于福建
- 举报
第PAGE页共NUMPAGES页
2026年软件工程师面试全攻略:编程语言与算法测试
一、编程语言基础(Java)
共5题,每题10分,总分50分
1.题目:
java
publicclassTestClass{
publicstaticvoidmain(String[]args){
inta=5;
intb=0;
try{
intresult=a/b;
}catch(ArithmeticExceptione){
System.out.println(Error:+e.getMessage());
}finally{
System.out.println(Thisisalwaysexecuted.);
}
System.out.println(Programcontinues...);
}
}
问题:运行以上代码,输出结果是什么?解释`finally`块的作用。
2.题目:
java
classParent{
publicvoiddisplay(){
System.out.println(Parentmethod);
}
}
classChildextendsParent{
publicvoiddisplay(){
System.out.println(Childmet
原创力文档

文档评论(0)