what is difference between throw and throws in exception?
Answer Posted / pavithra
throws is used to throw an exception from the method
without handling that exception where as 'throw' is used
to throw the exception to catch block and handle it.
| Is This Answer Correct ? | 123 Yes | 79 No |
Post New Answer View All Answers
Do you know why doesn't the java library use a randomized version of quicksort?
What do heavy weight components mean in java programming?
Is space a character in java?
What is method overloading in JAVA? Why is it not present in C ?
Why java is call by value?
Is age discrete or continuous?
Hi friends am new to java. I read jar file means collection of java files. For executing struts application what are the necessary jar files. " struts.jar " file contains what. can u explain
What is the difference between access specifiers and access modifiers in java? 16
What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?
How do you compare characters in java?
Can a class be defined inside an interface?
What are the differences between wait() and sleep()?
When should we create our own custom exception classes?
How do you sort a set in java?
Is hashmap thread safe?