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?
What is the similarity between try and throw?

Answers were Sorted based on User's Feedback



What is the difference between throw and throws? What is the similarity between try and throw?..

Answer / giri

throw is used to throw an exception manually, where as
throws is used in the case of checked exceptions

Is This Answer Correct ?    4 Yes 1 No

What is the difference between throw and throws? What is the similarity between try and throw?..

Answer / amar

throw is a statement level.throws is a method level.
In manual exception handling,we can also use the throws to
handle the excepions by the jvm,insted of handling there.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are Normalization Rules? Define Normalization?

0 Answers  


What is a package in java? List down various advantages of packages.

0 Answers  


Marker interface means , interface which has no methods.Then what is the necessity of its usage.I read "it tells the compiler that it should be treated differently ". "It is used to store state of an object". But still am not clear.Please explain clearly.

2 Answers  


What is thread pool in java with example?

0 Answers  


How do you remove all elements from an arraylist in java?

0 Answers  


What is fail first in java?

0 Answers  


What is the Layout for ToolBar?

1 Answers  


Can we overload run() method in java?

0 Answers  


class A{ some variables; public void a()throws Excepion1,Exception2{....} } class B extends A{ variables... public void a()throws E2,E3{.....} } Qns: here override of methods occurs or not,ore else wil give any compilation error or run properly..plz tell me briefly whts happening with the above codes....

4 Answers   Quinnox,


What is a treemap in java?

0 Answers  


In which way does a Primitive data type is passed ?

5 Answers   Sun Microsystems,


Differentiate between a constructor and a method? Can we mark constructors final?

0 Answers  


Categories