wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Exceptions exercise Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Exceptions exercise" Watch "Exceptions exercise" New topic
Author

Exceptions exercise

michael delta
Ranch Hand

Joined: Aug 11, 2009
Posts: 35

Could someone explain the control flow in this exercise?It's getting a little messy.

Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37980
    
  22
Put some System.out.println(), or e.printStackTrace() (in catch only) calls in the blocks, and see which block you are in.
If you seem to work from right-to-left, remember the = operator evaluates what is on its right, then applies it to what is on its left.
michael delta
Ranch Hand

Joined: Aug 11, 2009
Posts: 35

Nice one!!!Thnx!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37980
    
  22
michael delta wrote:Nice one!!!Thnx!
You're welcome The result of having such problems in the past.

Please avoid abbreviations like thkx because they are difficult for non-native English speakers to understand.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Exceptions exercise
 
Similar Threads
Exception
try, catch question
How to catch the exceptions thrown in the finally block.
2 objects EXCEPTION
Best way to get input