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
Why do we create public static method in java?
What is the collections api?
Are floats faster than doubles?
What is isa relationship?
What is the difference between length and length () in java?
Can we catch more than one exception in single catch block?
What are parsers? Dom vs sax parser.
what is deadlock? : Java thread
Suppose if we have variable ' I ' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?
Is age discrete or continuous?
Explain spliterator in java8?
What is the use of predicate in java 8?
What is the default value of the local variables?
What does the “static” keyword mean?
Explain about static imports in java?