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
Are registers volatile?
Can static methods be inherited?
Can inner class final?
What is the final keyword?
Explain the difference between serializable and externalizable in java?
Differentiate between nested and inner class in java.
What is classname class in java?
What is this keyword used for?
What are new features introduced with java 8 ?
What are the properties of thread?
What is a jit compiler?
What are the major drawbacks of external iteration?
Explain constructors and types of constructors in java.
What is difference between string and stringbuffer?
How many bits is a string in java?