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

Is java an open source?

982


What is the difference between abstract classes and interfaces?

1032


How to write custom exception in java?

1063


What ide should I use for java?

1037


What will happen if static modifier is removed from the signature of the main method?

972


Can inner class have constructor?

1048


Can a class be private in java?

1003


What are the advantages of user defined functions?

1012


What is meant by 'Class access modifiers'?

1053


Explain about collection interface in java?

997


What is the difference between a vector & an array list?

1174


Define iterator and methods in iterator?

975


What are the limitations of procedural programming approach?

1060


What is generics in java interview questions?

1077


What is variable and its types?

1035