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 the benefit of inner classes in java?

1142


Difference between association, composition and aggregation?

1043


What are the advantages of arraylist over arrays?

1150


What are static initalizers in java ?

1063


What is the access scope of protected access specifier?

1043


What is the difference between a checked and an unchecked exception?

1044


What is the difference between scrollbar and scrollpane?

1133


In how many ways we can do exception handling in java?

1042


what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread

1048


What is collection api?

1107


What is bifunction in java?

1273


What is the meaning of 3 dots in java?

1209


How many bytes is string in java?

1333


What is static synchronization?

1162


What is the difference between equals() and?

1261