Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is null in java?

972


Why java is called not pure object oriented language?

1023


What is the difference between stringbuffer and stringbuilder class?

1108


What is anagram in java?

933


What is the use of singleton?

966


What is the reflection?

1008


Why singleton pattern is better than creating singleton class with static instance?

1000


How many types of constructors are used in java?

1187


Can I learn java without any programming experience?

1041


explain multi-threading in java?

1032


What is the symbol for average?

1030


What is static keyword in java?

1001


How do you decide when to use arraylist and linkedlist?

991


What is the syntax and characteristics of a lambda expression?

1046


What is operator overloading. Is it is supported in java?

1031