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 is difference between throw and throws in exception?

Answer Posted / chandrakala

throw and throws are clauses.
throws: if we are not interested to catch the exception then we have to use throws. if any exception arises then internally JVM handles that exception.
throw: If we want to throw an exception explicitly we have to use throw.It comes under user defined exception.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Compare overloading and overriding?

1061


Can we create object of inner class in java?

998


What is the multi-catch block in java?

1105


What are the different types of methodologies?

1066


What is passing value java?

1112


What is a boolean structure?

1135


What are the important features of Java 10 release?

1033


If we don’t want some of the fields not to serialize how to do that?

1063


What if static is removed from main method?

1108


What is the use of jtable?

1166


What is type parameter in java?

1006


What is the purpose of the main method?

1039


Is empty in java?

1112


What are untrusted applets?

1202


What are the two basic ways in which classes that can be run as threads may be defined?

1130