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
How are the elements of a gridbaglayout organized?
What is the do while loop syntax?
What does %4d mean in java?
What are the differences between path and classpath variables?
How can a gui component handle its own events?
What are java threads?
Can we declare the main method of our class as private?
What about static nested classes in java?
Can we print null in java?
Is oracle charging for java?
What is void keyword?
How do you use compareto?
What is enhanced loop in java?
What modifiers are allowed for methods in an interface?
What is vector capacity in java?