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 does += mean coding?
What is the covariant return type?
What is array list in java?
Difference between string, string builder, and string buffer?
What advantage do java's layout managers provide over traditional windowing systems?
If a variable is declared as private, where may the variable be accessed?
Explain public static void main(string args[]).
What is externalizable?
What is the maximum size of hashmap in java?
How to overcome the exception object reference not set to an instance of object?
What are the advantages of exception handling?
How to check if linked list contains loop in java?
What is advantage of java?
What is the difference between jdk, jre, and jvm?
What is nan in java?