• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exceptions exercise

 
michael delta
Ranch Hand
Posts: 35
Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone explain the control flow in this exercise?It's getting a little messy.

 
Campbell Ritchie
Marshal
Posts: 53162
124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 35
Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nice one!!!Thnx!
 
Campbell Ritchie
Marshal
Posts: 53162
124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!