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
What are java annotations?
What is super keyword explain with example?
What is the use of 'super' keyword inside a constructor?
Write a program to show whether a graph is a tree or not using adjacency matrix.
Can a class have multiple superclasses?
Explain the difference between an Interface and an Abstract class?
When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?
How many ways can an argument be passed to a subroutine and explain them?
Differentiate between postfix and prefix operators in java.
Explain the difference between abstract classes and interfaces in java?
Is double bigger than float?
What is broken and continue statement?
How to invoke external process in java.
How many bytes is string in java?
What is a singleton in genetics?