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

Explain reverse a linked list recursive java solution?

973


What are inner classes or non static nested classes in java?

1159


What do you mean by order of precedence and associativity?

932


Write a function to print Fibonacci series and Tribonacci series?

1166


Is sizeof a keyword in java programming?

1053


What is size_t?

971


How to display names of all components in a Container?

2921


How do you allocate memory to object?

967


Write code of any action class?

990


Why static functions are used?

1074


Can we use static class instead of singleton?

1038


What is the exception hierarchy in java?

938


Can we extend singleton class in java?

945


What is the difference between throw and throws keywords?

1035


How do you check if a string contains only numeric digits?

1108