what is difference between throw and throws in exception?
Answer Posted / chandra sekhar
In Throws, what ever the exception you are declaring are
handle by JVM. If it is a user defined exception in throws
block, JVM doesn't know when to throw that exception. For
this purpose we use Throw for a certain conditions/logic to
throw these user defined exceptions.
I think the above makes sense.
| Is This Answer Correct ? | 45 Yes | 5 No |
Post New Answer View All Answers
What is meant by structural programming?
What are void pointers?
What is meant by class loader? How many types are there? When will we use them?
Can you extend main method in java?
What is the name of the java compiler?
Is null a string or object in java?
Explain the significance of class loaders in bootstrap?
Can we force garbage collector to run ?
When we should use serialization?
Difference between arraylist and hashset in java?
how to write a server program and sending the mails to the server using smtp protocol please help me
Can memory leak happen java?
Is heap stored in ram?
Is java a super set of javascript?
How can you add and remove nodes in jtree?