what is difference between throw and throws in exception?
Answer Posted / sathiya moorthy v
throw --> manually throw exception.
Ex: throw ThrowableInstance;
throws -->Any exception that is thrown out of a method must
be specified as such by a throws clause
Ex: <access specifier> <return type> <methodName> throws
Exception{
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Is void a keyword in java?
What is lazy programming?
Explain the JDB in depth & command line.
What is meant by method overriding?
Name few java 8 annotations ?
Why is java so important?
can I implement my own start() method? : Java thread
Difference between linkedlist and arraylist.
What is ellipsis in java?
What is the role of garbage collector in java?
What is the difference between public, private, protected, and friend access?
What is the collections api?
Can arraylist hold different types java?
Explain the scope or life time of class variables or static variables?
Is object a data type?