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 / sathiya moorthy v

throw --> manually throw exception.
Ex: throw ThrowableInstance;
throws -->Any exception that is thrown out of a method must
be specified as such by a throws clause
Ex: <access specifier> <return type> <methodName> throws
Exception{
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the new features in java 8? Explain

949


Can we use string in switch case in java?

1050


What does s mean in regex?

1012


Which graphs are functions?

966


Is java written in c?

953


What are java threads?

1125


Define the term string pool?

1002


How do you download stubs from Remote place?

1781


What is Hierarchy of exception?

1080


Can constructor be inherited?

1031


How to print nodes of a Binary tree?

2247


What is constructor chaining in java?

1060


How do you sort arrays in java?

925


Is java 11 paid version?

981


Which method must be implemented by all threads?

1259