what is difference between throw and throws in exception?
Answer Posted / basha
throw & throws is a keyword in Exceptions.
throw is to throw the exception defined by User.
Ex:if user enter wrong pin number,it shows error
(Exception). This s the exception used to throw it.
And throws is that which will throw the error as the Cash
Dispenser not having the cash to dispense. This type of
error(exception) is defined by throws keyword.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
how many types of Inheritance?
Name few java.lang classes introduced with java 8 ?
Why Do I Get A "permission Denied" Error After Downloading The .jnlp Java Launcher For The Vkvm?
What are the parts of methodology?
What is the difference between assignment and initialization?
Difference between notify() method and notifyall() method in java?
Write a program to check string is palindrome without using loop?
who can i handle multiple client in RMI
What is finalize()?
What is string immutability?
How do weakhashmap works?
please send me hr interview questions in it industry
How to create a base64 decoder in java8?
How many bits are in a sentence?
Which containers use a flowlayout as their default layout in java programming?