what is difference between throw and throws in exception?

Answer Posted / sinduja

THROW IS USED TO THROW AN EXCEPTION EXPLICITLY WHEREAS,THROWS INCLUDED IN THE METHODS DECLARATION PART WITH A LIST OF EXCEPTION THAT IT CAN POSSIBLE TO THROW.

THROW IS USED TO PASS CUSTOMER MESSAGE.AND THROW HANDLES
USER DEFINE EXCEPTION.
WHEREAS THROWS IS HANDLED BY JVM.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are internal and external variables?

547


What is meant by binding in rmi?

552


What is a boolean structure?

563


Explain methods specific to list interface?

559


How can we create an immutable class in java?

585






When can we say that threads are not lightweight process in java?

598


Why we use set in java?

521


What are the differences between graph and tree?

651


What is flush buffer?

521


Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?

623


Why main() method is public, static and void in java ?

600


Is java written in c?

548


What is assembly used for?

508


What do you know about the garbage collector in java?

575


Why we go for collections in java?

557