Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
    Bookmark Topic Watch Topic
  • New Topic

Finally abrupt return

 
Vikrant Sahdev
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Report post to moderator
I found this question on a Mock exam for SCJP1.5:




I think the answer should be A1 but its A4. I think its A1 bcos even though return exits finally block abruptly,it still compiles without error.

What do you guys think ?
Also do you think there would be any difference in answer,if compiled with 1.4 or 1.5 ?
 
Peter Mularien
Author
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Report post to moderator
There's no compiler error when using the 1.4.2 or 1.6.0 compiler. I agree with you that it should print 3. Do they give any indication as to what the compiler error would be?
 
Burkhard Hassel
Ranch Hand
Posts: 1274
  • Mark post as helpful
  • send pies
  • Report post to moderator
double thread closed.
answer here please:
http://www.coderanch.com/t/265314/java-programmer-SCJP/certification/Finally-abrupt-return
 
    Bookmark Topic Watch Topic
  • New Topic