Most asked top Interview Questions and Answers & Online Test
Education platform for interview prep, online tests, tutorials, and live practice

Build skills with focused learning paths, mock tests, and interview-ready content.

WithoutBook brings subject-wise interview questions, online practice tests, tutorials, and comparison guides into one responsive learning workspace.

Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Without Book Ask Question

Question. 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.

Posted At Jul 18, 2014 Posted By Pom Berry

Enter your Answer

Name
Email Address
Answer
Security Check
Solve this to continue: 2 + 6 = ?
Copyright © 2026, WithoutBook.