What classes of exceptions, thrown by a throw statement?
Answer Posted / niranjanravi
Syntax for throw is:
throw throwableinstance;
Here the throwableinstance must be an object of type
Throwable or sub-class of Throwable.Simple types such as
int or char as well as non-Throwable types such as String
or object can't be assigned to throw.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Why java is used everywhere?
Why is java called the platform independent programming language?
What is the argument in java?
How do you allocate memory to object?
State two differences between C and Java.
what is thread? What are the high-level thread states? Or what are the states associated in the thread? : Java thread
Explain the difference between hashmap and hashtable in java?
How do you create a method in java?
How long will it take to learn java?
Is a char always 1 byte?
explain copyonwritearraylist and when do we use copyonwritearraylist?
What is the use of static class?
Explain the difference between the public, private, final, protected, and default modifiers?
Can we restart a thread already started in java?
What is the maximum size of list in java?