aspose file tools*
The moose likes Java in General and the fly likes throws Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "throws Exception" Watch "throws Exception" New topic
Author

throws Exception

Cham Wick
Greenhorn

Joined: Dec 28, 2011
Posts: 8
According to above code why don't we need try...catch block to execute "a.start();"
I'm new to java and as far as I know it needs a try...catch block to execute a method code if it thorws an Exception


[HENRY: added code tags]
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18896
    
  40

Cham Wick wrote:According to above code why don't we need try...catch block to execute "a.start();"
I'm new to java and as far as I know it needs a try...catch block to execute a method code if it thorws an Exception



ArithmeticException exceptions are unchecked exceptions.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Cham Wick
Greenhorn

Joined: Dec 28, 2011
Posts: 8
Thanks
 
Don't get me started about those stupid light bulbs.
 
subject: throws Exception