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
Which package is used for pattern matching with regular expressions?
Why are generics used?
What is difference between string and new string?
what is thread in Java ?
What are abstract classes and anonymous classes?
Is java free for commercial?
What do you mean by checked exceptions?
What is method overloading in JAVA? Why is it not present in C ?
What are the java ide’s?
Can a class have 2 constructors?
What are the main features of java?
How many decimal digits is 64 bit?
What is finally and finalize in java?
Why arraylist is used in java?
What is the static keyword?