difference throws and throw in java

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we overload run() method in java?

599


Can we access the non-final local variable, inside the local inner class?

518


What is boolean strategy?

630


What is a parameter in matrices?

547


What is module in project?

520






How does compareto work in java?

583


Which object oriented concept is achieved by using overloading and overriding?

560


What are variable arguments or varargs?

573


What is skeleton and stub?

595


In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?

843


What is the final method?

606


What are the methods to rectify ambiguities in the interfaces in JAVA?

605


Can we convert integer to string in java?

600


What does it mean to flush a file?

574


Explain about arraylist?

582