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
Can you extend main method in java?
How to sort elements in a parallel array in java?
Can we use string in the switch case?
What is the use of parseint in java?
How does split work in java?
Does list allow duplicates in java?
What is the byte range?
Can java cast null?
Is null an object java?
What is the difference between inner class and nested class?
What is a percentage sign called?
Can you give names of Container classes?
what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent
Describe 2 different ways to concatenate two strings.
How does arraylist work in java?