Adobe Interview Question for Software Engineer / Developers


Country: United States




Comment hidden because of low score. Click to expand.
1
of 1 vote

From "Inside the Java 2 VM" Chapter 17 by Bill Venners:
If this situation (i.e., exception) occurs, the JVM knows to jump to the bytecode sequence that implements the catch clause by looking up and finding the exception in a table. Each method that catches exceptions is associated with an exception table that is delivered in the class file along with the bytecode sequence of the method. The exception table has one entry for each exception that is caught by each try block.

- ms January 29, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

well ms, But in case of nested try catch how the table is managed.??

- techieDeep January 29, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Generally nested try-catch are managed by stacks. Like a function, try-catch block will define a range of bytecode and push an address (the code inside catch) onto the stack. A throw statement basically jump to the catch block(s), and pop the address from the stack. If no handle is defined, then we recursively jump & pop until the stack is empty. At this point, it becomes an unhandled exception and the program quits.

- Edwardgao January 30, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Each try-catch-finally block is associated with an Exception handler in the JVM. If there is no exception handler in the thread where exception happens the thread exits and it's status is returned to the JVM.

- Abhi January 28, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

well, JVM generally gives a default handler for not handled exception ... This is the concept related to exception propagation, Right?? But how this handler complete the task??

- techieDeep January 28, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

That works on the range of Instruction Offsets where the Exceptions can occur. If the exception occurs in that range the handler catches it.

- Abhi January 28, 2013 | Flag


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More