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 / chandrakala

throw and throws are clauses.
throws: if we are not interested to catch the exception then we have to use throws. if any exception arises then internally JVM handles that exception.
throw: If we want to throw an exception explicitly we have to use throw.It comes under user defined exception.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the significance of listiterator.

1108


Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?

1034


What is the purpose of the System class?

1006


Do extraneous variables affect validity?

920


What is method reference?

987


Where is the find and replace?

1011


What is exception handling in java?

1044


Can vector have duplicates in java?

957


What is math floor in java?

956


Is space a char?

932


Write a program to check for a prime number in java?

1045


How many bits is a string in java?

1034


Can inner class extend any class?

1061


What are the parts of a method?

984


A person says that he compiled a java class successfully without even having a main method in it? Is it possible?

1063