Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can the main() method throw Exceptions ?

 
Parag Kale
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can the main() method throw any exceptions ?
In general, is there any restriction on static methods for throwing Exceptions ?
 
Bosun Bello
Ranch Hand
Posts: 1510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, main can throw exceptions and can be declared to throw exceptions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic