adspace
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
explain different ways of using thread? : Java thread
What is the difference between break and continue statements?
What is a classloader in java?
What do you mean by an interface in java?
Differentiate between static and non-static methods in java.
What is an object in java and how is it created?
Write a program to find the whether a number is an Armstrong number or not?
Realized?
Write a program to print count of empty strings in java 8?
What is parsing in java?
How to sort array in descending order in java?
How to create a base64 decoder in java8?
What is the difference between equals() and == in java?
Is minecraft 1.15 out?
What is a constructor overloading in java?