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

Why we cannot override static method?

1061


What two classes are used to read data only?

1099


Which is a valid identifier?

1206


What is console based application in java?

1037


Difference between string, string builder, and string buffer?

1103


What is a ternary operator in java?

980


What are kinds of processors?

994


How do you reverse a list?

1009


Is singleton class immutable?

965


Explain about complier design(phases)

1081


What is the disadvantage of synchronization?

1012


Is null == null in java?

1107


What is difference between class and object in java?

1077


Which method returns the length of a string?

1033


Does unicode support all languages?

1031