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 the difference between throw and throws?

Answer Posted / senthil nathan

throws: If a method is not capable of handling the raised
exception and it wants the caller of the method to
handle the exception means then the method uses the
"throws" keyword... The exception raised here is
of System Exception not User Exception...


throw: If the method is capable of handling the exception
by using try&catch block then this method uses the
"throw" keyword.. It is also used to raise our own
exception.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How long will it take to learn java?

938


What are the four integer types supported by java?

979


What are the new features in java 8? Explain

913


What do you mean by Hash Map and Hash Table?

1022


How do you use substring in java?

1057


What state does a thread enter when it terminates its processing in java programming?

977


Which types of exceptions are caught at compile time?

973


Can we compare two strings in java?

956


What is queue in java?

1066


Does a function need a return?

915


What are exception handling keywords in java?

975


What is the difference between post and put?

993


What are passing parameters?

1008


Explain the differences between abstraction and encapsulation?

995


Why java is a platform independent? Explain

1005