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 difference between notify and notifyall method?

0 Answers  


What is garbage collection? What is the process that is responsible for doing that in java?

0 Answers  


Which of the following is not an isolation level in the JDBC

0 Answers   CTS,


For technical interview question please sir send me because tomorrow my interview

1 Answers   FactSet Systems,


What is an event?

2 Answers  


What is the difference between Integer and int?

10 Answers   Infosys,


Catch(Exception e){ } in that what is Exception and purpose of that in that place exactly?

3 Answers  


What is the difference between ArrayList and Vector? which one is better in Java

0 Answers   SkillGun Technologies,


What do u mean by method and also contructer in java ?

3 Answers  


What is meant by serialisation and deserialisation?

4 Answers  


Difference between overloading and overridding?

4 Answers  


Write a java program for binary search?

0 Answers  


Categories