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 / gourav shivhare

The throw keyword denotes a statement that causes an exception to be initiated. It takes the Exception object to be thrown as an argument. The exception will be caught by an enclosing try-catch block or propagated further up the calling hierarchy. The throws keyword is a modifier of a method that denotes that an exception may be thrown by the method. An exception can be rethrown.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between abstract class and interface in java?

934


Can each java object keep track of all the threads that want to exclusively access it?

909


What is hashmap in java?

1022


Which graphs are functions?

903


Is stringwriter thread safe?

940


What is method overloading with type promotion?

1214


What is the difference between an array and an array list?

960


How can you set an applet’s height and width as a percentage?

877


What's the difference between int and integer in java?

1098


Why are there no global variables in java?

1004


What are the types of sockets in java?

1057


What is the difference between class forname and new?

947


What is the covariant return type?

1026


Which collection allows duplicate values in java?

923


What is the exact difference in between unicast and multicast object? Where we will use?

941