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...

difference throws and throw in java

Answer Posted / chaitanya

throws clause is used when the programmer does not want to
handle the exception and throw it out of a method.throw
class is used when the programmer wants to throw an
exception explicitly and wants to handle it using catch
block.hence ,throws and throw are contradictory.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What if constructor is protected in java?

1104


Differece between class and generic class?

1021


How do you initialize an arraylist in java?

1032


What does the three dot emoji mean?

1112


What is a stringbuffer?

959


What is a singleton puppy?

974


When should I use stringbuffer?

1001


What class allows you to read objects directly from a stream?

1314


What does it mean that a method or field is “static”?

969


How can a gui component handle its own events?

1098


Write a program in java to establish a connection between client and server?

952


What is stringwriter?

948


What is object of class in java?

1118


What happens if we override only equals?

967


What methods are used to get and set the text label displayed by a button object?

1005