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 memory leak and how does java handle it?
What do you mean by pointer value and address?
Why can we not override static method?
What is meant by flickering?
Are arrays passed by reference in java?
What are three types of loops in java?
What is variable declaration and definition?
What is use of static method?
Justify your answer that you can't define a method inside another method in java, if you can then how?
Can size_t be negative?
What is a parent class in java?
What is the method overriding?
Is int a class in java?
What is the maximum size of hashmap in java?
Can we make a constructor final?