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 upcasting and downcasting     -  
 difference between the String and StringBuffer     -  
 find the difference between dates in asp.net     -  
 difference between a Window and a Frame     -  
 difference between a MenuItem and a CheckboxMenuItem     -  
 Difference between Externalization and Serialzation     -  
 difference between the Boolean & operator and the &&     -  
 Difference between forward and sendRedirect     -  

Topic Tags

Java Exceptions