Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what difference between throw and throws in exception
handling.

Answer Posted / dani

You can declare multiple exception thrown by method in
throws keyword by separating them in common
e.g. throws IOException, ArrayIndexBoundException etc,

while you can only throw one instance of exception using
throw keyword e.g. throw new IOException("not able to open
connection").

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does the garbage collector works in java?

1052


Can we have a try block without catch block?

951


What is an array in java?

1143


How are java objects passed to a method and what are native methods?

1032


What are the two ways to create a thread?

964


What is double checked locking in singleton?

1013


Why java applets are more useful for intranets as compared to internet?

1022


what is synchronization? : Java thread

979


What does jenkins do?

874


What are wrapped classes in java programming?

1030


Similarity and difference between static block and static method ?

884


What are the benefits of java?

1099


Explain about instanceof operator in java?

1005


What is bigger kb or mb?

987


What happens if constructor is private?

980