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

What is preflight request?

1018


What is a default constraint?

1069


What is pojo class in java?

1102


How can we make string upper case or lower case?

1076


Write a program to print the pattern given below

934


How is string immutable in java?

1037


What is oop principle in java?

1163


What is the difference between the direct buffer and non-direct buffer in java?

1032


How arrays are stored in memory in java?

978


What is meant by collection in java?

1075


Is int a class in java?

985


What is double in java?

987


What is the default value of an object reference declared as an instance variable?

1123


What is the difference between throw and throws in java?

1099


What are the various access specifiers for java classes?

1056