Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Exceptions exercise

 
Ranch Hand
Posts: 35
Mac OS X Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could someone explain the control flow in this exercise?It's getting a little messy.

 
Marshal
Posts: 79012
375
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Mac OS X Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nice one!!!Thnx!
 
Campbell Ritchie
Marshal
Posts: 79012
375
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic