what is difference between throw and throws in exception?
Answer Posted / deewan singh
throw keyword is used to throw Exception from any method or static block in Java while throws keyword, used in method declaration, denoted which Exception can possible be thrown by this method.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which one of the following suits the description of a string better: derived or primitive?
Can we override constructors in java?
What is the final method?
What is the purpose of the return statement?
Can a main method be overloaded?
How does singleton class work?
What is the arraylist in java?
What are the characteristics of Final,Finally and Finalize keywords.
Write a java program to print fibonacci series?
What are meta-annotations?
What are different data types?
Define nashorn in java8.
Can we have multiple catch block for a try block?
What is string and its types?
What are streams in java 8?