What is the difference between throw and throws?
Answer Posted / kashi
thow is used to explicitly transfer the userdefined
exception class object from the function to the calling
place.
thows is used to mention or indicate to the compiler as
well as the enduser, that a particular function is proven
to generate exception class object and those objects are
not handled in the function itself.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Is there a way to increase the size of an array after its declaration?
Why is inheritance used in java?
I want my class to be developed in such a way that no other class (even derived class) can create its objects. Define how can I do so?
What is the transient keyword?
Can we assign the reference to this variable?
What is class variable java?
Explain the public class modifier?
What is default locale java?
Should a main method be compulsorily declared in all java classes?
What does provide mean construction?
Write a java program that prints all the values given at command-line.
Does variable declaration allocate memory?
Is hashmap thread safe?
What is the use of jtable?
What are "methods" and "fields"?