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 are pass by reference and pass by value?

986


Explain notify() method of object class ?

1103


Why Do I Get A "permission Denied" Error After Downloading The .jnlp Java Launcher For The Vkvm?

1144


How do you include a string in java?

989


What is tree node in java?

960


Why is java architectural neutral?

1110


Java.util.regex consists of which classes?

993


What is the use of static class?

1183


What is variable and example?

965


What is the use of coding?

965


Difference between final and effectively final ?

1104


Why to use nested classes in java?

1118


What is the maximum size of byte array in java?

1009


How do you check if a number is a perfect square?

992


What are the drawbacks of reflection?

1007