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

How do you use wildcards?

0 Answers  


What things should be kept in mind while creating your own exceptions in java?

0 Answers  


What is a local block?

0 Answers   Global Logic,


how can u handle run time exception in java? explain with brief explanation with examples?

2 Answers   CTS,


Which sorting is used in arrays sort in java?

0 Answers  


What is the indent key?

0 Answers  


What is the static variable?

0 Answers  


What are class members by default?

0 Answers   Hexaware,


Does java have a compiler?

0 Answers  


What is meant by design patterns?

0 Answers  


What technique can be employed to compare two strings?

0 Answers  


What are different access specifiers in java? Explain

0 Answers  


Categories