Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

try-catch-block

 
Moya Green
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to check these two concepts, Am I right?Pls help!
1)A catch block should always be related with a try block;
2)A finally cannot stand alone without a try block.
-Moya
 
Anthony Villanueva
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Yes, although a try block may have a finally block instead of a catch block.
2. Yes.
 
Moya Green
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Anthony,
Thanks for your timely reply.
-Moya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic