What is the difference between throw and throws?
Answer Posted / suresh
mainly throw is used for user defined exceptions and throws
is used for compiler defined excetions.
Ex: if u get a NullPointer exception then we throws this
excetion to the compiler defined excetion class.
if u get malformed or ur own excetion in this time we to
throw this to our own defined excetion
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is an object’s lock and which object’s have locks?
What is consumer in java?
How do you empty a list in java?
How listener identify that the event came from a particular object?
Does constructor creates the object ?
What is the same as procedures?
How does compareto method work?
What is method reference?
Do we have pointers in java?
Is set ordered?
What state is a thread in when it is executing?
What is json parser in java?
What are the features of java?
What is a java applet? What is an interface?
What are the four integer types supported by java?