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
How does the garbage collector works in java?
Can we have a try block without catch block?
What is an array in java?
How are java objects passed to a method and what are native methods?
What are the two ways to create a thread?
What is double checked locking in singleton?
Why java applets are more useful for intranets as compared to internet?
what is synchronization? : Java thread
What does jenkins do?
What are wrapped classes in java programming?
Similarity and difference between static block and static method ?
What are the benefits of java?
Explain about instanceof operator in java?
What is bigger kb or mb?
What happens if constructor is private?