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 JFC?
List down the methods and interfaces of collection class in java.
we have syntax like for(int var : arrayName) this syntax is to find whether a number is in the array or not.but i want to know how to find that number's location.
What is an iterator java?
Why java does not support pointers?
Why there are some null interface in java? What does it mean?
What is finalize() function in java?
What are the methods used to implement for the key object in the hash map?
Is array a class?
Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?
What is java argument list?
Difference between current previous versions of Java?
When do we use synchronized methods in java?
What are the main differences between the java platform and other platforms?
How many bits is a boolean?