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

THROW IS USED TO THROW AN EXCEPTION EXPLICITLY WHEREAS,THROWS INCLUDED IN THE METHODS DECLARATION PART WITH A LIST OF EXCEPTION THAT IT CAN POSSIBLE TO THROW.

THROW IS USED TO PASS CUSTOMER MESSAGE.AND THROW HANDLES
USER DEFINE EXCEPTION.
WHEREAS THROWS IS HANDLED BY JVM.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are getters and setters used?

1060


What is string and example?

1040


What is struts in java?

1039


Can I learn java without any programming experience?

1040


Which is the class in java?

1052


Can a constructor call the constructor of parent class?

1042


What is the purpose of the enableevents() method?

1045


Write a java program to count the number of words present in a string?

982


How many times finalize method will be invoked? Who invokes finalize() method in java?

1020


Does garbage collection occur in permanent generation space in jvm?

1089


What will happen if a thrown exception is not handled?

1021


What is the use of object and class classes?

1041


Can we inherit a class with private constructor?

1129


What are the restriction imposed on a static method or a static block of code?

1059


What is double parsedouble in java?

1050