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 the difference between throw and throws?

Answer Posted / kanhaiya sharma

throws :- throws clause is used when programmer does
not want to handle to the exception and throw it out of a
method.

throw :- throw clause is used when programmer wants to
throw an exception explicitely and wants to handle it using
catch block. hence throws and throw is contradictory.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does method mean?

1129


What is the tradeoff between using an unordered array versus an ordered array?

1287


What is the major drawback of internal iteration over external iteration?

1078


What do you mean by exception handling in Java?

1364


How do you start a thread?

1095


Explain the selection sort algorithm?

1107


Which is the best approach for creating thread ?

1269


Why are variables important in research?

976


What is sizeof in java?

1165


What is the purpose of checked and unchecked exceptions in JAVA?

1065


How do you declare a variable?

1138


why not override thread to make a runnable? : Java thread

1058


When do I need to use reflection feature in java?

1133


How do you change an int to a string?

1058


Why is logger singleton?

1218