difference throws and throw in java

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is vector synchronized in java?

720


Why Java doesn’t support multiple inheritance?

809


What is the full meaning of java?

763


What is the difference between static binding and dynamic binding?

789


Which number is denoted by leading 0x or 0x in java?

820


Can we use String with switch case?

854


If a method is declared as protected, where may the method be accessed in java programming?

698


What is string substring?

787


Can keyword be used as identifier?

729


State two differences between C and Java.

935


What are the steps in the jdbc connection?

762


Highest level event class of the event-delegation model?

3692


Difference between final and effectively final ?

822


What is the difference between array and array list in java?

792


Why java is platform independent? Explain.

777