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
What are internal and external variables?
What is meant by binding in rmi?
What is a boolean structure?
Explain methods specific to list interface?
How can we create an immutable class in java?
When can we say that threads are not lightweight process in java?
Why we use set in java?
What are the differences between graph and tree?
What is flush buffer?
Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?
Why main() method is public, static and void in java ?
Is java written in c?
What is assembly used for?
What do you know about the garbage collector in java?
Why we go for collections in java?