Answer Posted / chaitanya
throws clause is used when the programmer does not want to
handle the exception and throw it out of a method.throw
class is used when the programmer wants to throw an
exception explicitly and wants to handle it using catch
block.hence ,throws and throw are contradictory.
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What do you mean by append?
What is string array?
What’s the difference between the methods sleep() and wait()?
What is :: operator in java?
How to create a custom exception?
What is math exp in java?
What are invisible components?.
What is use of static in java?
What is %02d?
Explain about fail safe iterators in java?
Difference between ‘>>’ and ‘>>>’ operators in java?
What is consumer interface?
Can a java program have 2 main methods?
Why do we need data serialization?
What is an object’s lock and which object’s have locks?