热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

模拟考试

设为首页

收藏此页面

订阅邮箱地址

Without Book 提问

问题. try catch finally printstacktrace in Eclipse

- Suppose system.out.println is writted in try, catch and finally all blocks. And e.printStackTrace is writted in catch block.
try{
System.out.println(\"Try\");
int i=1/0;
}
catch(Exception e){
System.out.println(\"Catch\");
e.printStackTrace();
}
finally{
System.out.println(\"Finally\");
}

For this program I\'ve seen printStackTrace error comes anywhere. It maybe just after Try, May be just after Catch or may be just after Finally; which should be only after Catch.
Why this is happening please let me know.

发布时间 Jul 18, 2014 发布者 Pom Berry

输入你的回答

姓名
邮箱地址
回答
安全验证
继续前请计算: 1 + 3 = ?
版权所有 © 2026,WithoutBook。