• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reg. main method

 
Angela Narain
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do we mean by "main method can throw CHECKED exceptions"
 
Nikhat Jahan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means main method can also throw subclasses of Exception and not just RuntimeException ( implying that it can have "throws Exception" clause. ).
This is my first answer on javaranch. I hope i am right
Nikhat.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nikhat is right! Main method can throw any check exception. Main method can altso be daclared final!
 
Angela Narain
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am still not clear.
What does it precisely mean by throwing checked exceptions in the main method ?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic