What is the difference between throw and throws?
Answer Posted / surender kannuri
throws clause is used to whenever programmer doesn't want to
handle exception.throws it out of method.
throw is used whenever programmer wants to handle exception
explicitly by using catch blocks.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the two categories of data types in the java programming language?
Differentiate between vector and array list.
What is the difference between break and continue statements?
Write code to implement bubble sort in java?
Discuss different types of errors that generally occur while programming.
How do you achieve polymorphism in java?
Is main is a keyword?
Is an empty arraylist null?
What is a java list?
Where are variables stored?
Can a class have multiple subclasses?
Can we synchronize static methods in java?
How do you sort data in java?
What are the important features of Java 9 release?
What is prefix of a string?