• Post Reply Bookmark Topic Watch Topic
  • New Topic

what is error?  RSS feed

 
arden liu
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any statement that may throw an Excetpion must be enclosed in a try bolck.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any statement that may throw an Excetpion must be enclosed in a try bolck.



It should be any statement that may throw checked (or non-runtime) excetpion must be enclosed in a try-catch block.

Nick
 
arden liu
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But in that sentence, it is an Exception, I think it is one instance of Exception, such as new Exception().
maybe the statement should change Exception into exception, it is very more clear.
Thanks anyway.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!