what is difference between throw and throws in exception?
Answer Posted / visweswara rao
throw:- System generated exceptions are automatically
thrown by the Java run-time system.To manualy throw the
exception,we use the keyword throw
throws:- Any exception that is thrown out of a method must
be specified as such by a throws clause
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is .net better than java?
How to perform merge sort in java?
Explain about interthread communication and how it takes place in java?
What is java reflection api?
Can we create a constructor in abstract class?
how to create constants in java?
What are the types of methods in java?
What are the advantages of encapsulation in java?
What are the two ways in which thread can be created?
How do you override a variable in java?
What is the difference between heap memory and stack memory?
What is the console in java?
Can we create a class inside a class in java?
What is the use of object and class classes?
What is nested interface?