What is the difference between throw and throws?
Answer Posted / swapna kumari arava
By Using throw , we can create our own exceptions or user
defined exceptions and we can thorw , where as throws
defines the list of exceptions to be thown by the method.
| Is This Answer Correct ? | 16 Yes | 4 No |
Post New Answer View All Answers
What is json parser in java?
What does the ‘static’ keyword mean? Is it possible to override private or static method in java?
Can a java program have 2 main methods?
Why is singleton class used?
How can we pass argument to a function by reference instead of pass by value?
What’s the difference between constructors and other methods?
What is the requirement of thread in java?
How java enabled high performance?
Is minecraft 1.15 out?
Where is core java used?
What are the string methods in java?
What are different types of constants?
What is comparator in java?
Name four container classes.
Can a class be declared as static?