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...


difference throws and throw in java

Answers were Sorted based on User's Feedback



difference throws and throw in java ..

Answer / chaitanya

throws clause is used when the programmer does not want to
handle the exception and throw it out of a method.throw
class is used when the programmer wants to throw an
exception explicitly and wants to handle it using catch
block.hence ,throws and throw are contradictory.

Is This Answer Correct ?    7 Yes 0 No

difference throws and throw in java ..

Answer / mary kamal

when exception raises if we nt handeling we just throw,and throws is used to handle the exception nt by programer,it is an indication to catch the exception who wer using that class

Is This Answer Correct ?    7 Yes 2 No

difference throws and throw in java ..

Answer / shanthini

The keyword 'throws' should be used only with the methods while the keyword 'throw'is a clause...
Throws is actually a declaration of any methods and Throw is used to handle the exceptions...

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More Core Java Interview Questions

what is the use of bean managed and container managed with example?

0 Answers   EDS,


How many types of JVM's (OR) Name of the JVM's which are used in Tomcat & Weblogic servers ?

1 Answers   TCS,


In how many ways we can do synchronization in java?

0 Answers  


what is the use of private constructor in core java?

3 Answers   OnMobile, Satyam, Yash Technologies,


what type of questions asked for barclays technologies pune please send urgent

0 Answers  


What is mysql driver class name?

0 Answers  


What is the purpose of final keyword and when to use it?

0 Answers  


what is type of statement in jdbc connection?

3 Answers  


Difference between Choice and a List?

1 Answers  


What do you understand by abstract classes?

0 Answers   HCL,


What is better- service oriented or batch oriented solutions?

0 Answers   Amdocs,


What do you mean by thread safe?

0 Answers  


Categories