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 many JVMs can run on a single machine and what is the Just-In-Time(JIT) compiler?

0 Answers   Global Logic,


What is the difference between yielding and sleeping in java programming?

0 Answers  


explain copyonwritearraylist and when do we use copyonwritearraylist?

0 Answers  


What is square root in java?

0 Answers  


What is the catch or declare rule for method declarations?

1 Answers  


Write a program to check string is palindrome without using loop?

0 Answers   Cyient,


Explain which of the following methods releases the lock when yield(), join(),sleep(),wait(),notify(), notifyall() methods are executed?

0 Answers  


Difference between this(), super()?

12 Answers   College School Exams Tests, Oracle,


What do you mean by data type?

0 Answers  


What is byte code and why is it important to java’s use for internet programming?

0 Answers  


How do we make a class serialize?

3 Answers   Syntel,


Explain notifyall() method of object class ?

0 Answers  


Categories