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
What is arguments in java?
How do you reverse sort in java?
What is enhanced loop in java?
what are the disadvantages of indexes in oracle?
What are the different types of sorting in java?
When will we prefer to use set and list in java and why?
What is the purpose of default constructor?
what is the difference between process and thread? : Java thread
What is ide with example?
What is array and arraylist in java?
How many bits is a float?
Explain about main thread in java?
How can you read content from file in java?
Are arrays passed by reference in java?
What is memory leak and how does java handle it?