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 / chandra sekhar

In Throws, what ever the exception you are declaring are
handle by JVM. If it is a user defined exception in throws
block, JVM doesn't know when to throw that exception. For
this purpose we use Throw for a certain conditions/logic to
throw these user defined exceptions.

I think the above makes sense.

Is This Answer Correct ?    45 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define how does a try statement determine which catch clause should be used to handle an exception?

1256


What is a nested class?

1176


Is logger a singleton?

1016


Can we define constructor in inner class?

1059


What is a layout manager and what are different types of layout managers available in java awt?

1309


What does a za z0 9 mean?

1192


Is a case study a method or methodology?

951


Does importing a package imports its sub-packages as well in java?

1017


What is the basic concept of java?

1069


What are the drawbacks for singleton class?

1080


What are singleton services?

966


Can main() method in java can return any data?

1242


How to create a custom exception?

1038


What things should be kept in mind while creating your own exceptions in java?

1230


Is array synchronized in java?

1085