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 java literals?
What is structure of java heap? What is perm gen space in heap?
What is math exp in java?
What is procedure overloading?
What are java annotations?
What is meant by design patterns?
What are latest features introduced with java 8?
What do the thread?class methods run() and start() do?
What is java dot?
What are class members by default?
What is difference between arraylist and list in java?
Explain about static nested classes in java?
What is 32 bit float?
What are format specifiers in java?
Can a class have an interface?