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

Throws keyword suggests that the particular method contains
an Exception and that uncaught Exception is thrown to be
next class where it is supposed to handle(i.e.to be by next
user as he want to handle that exception in his own
way).Simply it throws uncaught exception.But Throws keyword
is used to throw only checked Exceptions and avoids compile
time errors.
And throw keyword,which is used in case of manual
Exception,throw object of corresponding exception from try
to catch just like java implicitely does in cases other than
manual Exception.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between next () and nextline () in java?

939


What is static in java?

1029


Why chararray() is preferred over string to store the password?

961


What is function and its uses?

1040


What is default exception handling in java?

974


What is the difference between == and === javascript?

1094


What are three ways in which a thread can enter the waiting state in java programming?

1095


What is finalize method?

1046


What are decalarations?

1062


What is class array in java?

977


What is numeric data type?

929


What is rmi and steps involved in developing an rmi object?

994


What are the supported platforms by java programming language?

1004


What does the “static” keyword mean? Can you override private or static method in java?

1041


What is the main function in java?

1008