What is the difference between throw and throws?
Answer Posted / surender kannuri
throws clause is used to whenever programmer doesn't want to
handle exception.throws it out of method.
throw is used whenever programmer wants to handle exception
explicitly by using catch blocks.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How does enum work in java?
Explain java thread life cycle.
What is private public protected in java?
What is final keyword in java?
What are reference variables in java?
what is bmg file and how to create that files?what will it contailn?
What is an off by one error in java?
What are the different http methods?
What is the main use of generics in java?
What is variable length arguments in java?
Why does java have two ways to create child threads?
What are peerless components in java programming?
Is ++ operator thread-safe in java?
Is finalize() similar to a destructor?
Why is method overloading not possible by changing the return type in java?