Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

Difference between throw and throws

Fri Oct 24, 2008 7:56 pm

I heard a question in an interview difference between throw and
throws
can any one clear my dought ?



Re: Difference between throw and throws

Fri Oct 24, 2008 7:59 pm

You use throw to Throw your own Exception and use throws keyword to
mention that the method you are calling will throw an Exception and it has
to be handled !

Post a reply
  Related Posts  to : Difference between throw and throws
 How to throw Exceptions in Java?     -  
 difference between the >> and >>> operators     -  
 difference between a MenuItem and a CheckboxMenuItem     -  
 Difference between Externalization and Serialzation     -  
 difference between the Boolean & operator and the &&     -  
 Difference between forward and sendRedirect     -  
 Difference between PHP echo() and PHP print()?     -  
 difference between upcasting and downcasting     -  
 difference between the String and StringBuffer     -  
 find the difference between dates in asp.net     -  

Topic Tags

Java Exceptions