what difference between throw and throws in exception
handling.
Answer Posted / dani
You can declare multiple exception thrown by method in
throws keyword by separating them in common
e.g. throws IOException, ArrayIndexBoundException etc,
while you can only throw one instance of exception using
throw keyword e.g. throw new IOException("not able to open
connection").
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Is java an open source?
What is the difference between abstract classes and interfaces?
How to write custom exception in java?
What ide should I use for java?
What will happen if static modifier is removed from the signature of the main method?
Can inner class have constructor?
Can a class be private in java?
What are the advantages of user defined functions?
What is meant by 'Class access modifiers'?
Explain about collection interface in java?
What is the difference between a vector & an array list?
Define iterator and methods in iterator?
What are the limitations of procedural programming approach?
What is generics in java interview questions?
What is variable and its types?