Home > Software > Java > Core-Java
Interview Questions   Tutorials   Discussions   Programs   

Core-Java - What is difference between throw and throws in exception?




269
views
asked marvit August 16, 2014 09:23 AM  

What is difference between throw and throws in exception?


           

1 Answers



 
answered By bhjahnavi   0  
throws clause is used when the programmer does not want to handle the exception and throw it out of a method.throw clause is used when the programmer wants to throw an exception explicitly and wants to handle it using catch block .hence, throws and throw are contradictory
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert