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

Is a copy constructor?

1118


How to stop a thread in java? Explain about sleep () method in a thread?

1071


Is ruby built on java?

990


What is the synonym of framework?

1053


how we can create packages in java?

1017


What is the old name of java?

1039


How to access arraylist elements in java?

1040


Difference between serialization and deserialization in java?

1211


What are abstract methods in java?

1171


What is the return type of the main method?

1090


Explain runtime exceptions?

1241


explain local datetime api in java8?

1060


Explain the difference between hashmap and hashtable in java?

994


What is float in java?

1039


How do you do absolute value in java?

1030