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
What is meant by string is immutable?
What is static class
What are the different tags provided in jstl?
Can we use both this () and super () in a constructor?
What are the 8 primitive data types in java?
What is java argument list?
What is the protected method modifier?
Can java arraylist hold different types?
Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.
What are the differences between this and super keyword?
What is runtime polymorphism or dynamic method dispatch?
Where are local variables stored?
how would you implement a thread pool? : Java thread
How many bits is a string in java?
Explain the purpose of garbage collection in Java?