Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Reg. main method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Reg. main method" Watch "Reg. main method" New topic

Reg. main method

Angela Narain
Ranch Hand

Joined: Apr 14, 2001
Posts: 327
What do we mean by "main method can throw CHECKED exceptions"
Nikhat Jahan

Joined: Aug 07, 2001
Posts: 3
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
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Nikhat is right! Main method can throw any check exception. Main method can altso be daclared final!
Angela Narain
Ranch Hand

Joined: Apr 14, 2001
Posts: 327
I am still not clear.
What does it precisely mean by throwing checked exceptions in the main method ?
I agree. Here's the link:
subject: Reg. main method