Quote:
Originally Posted by debasish
What is the difference between the keywords throw and throws in exception handling?
|
The difference between throws and throw is that throw is used to define user defined exceptions as per their requirement where as throws is used to propagate the exception
ex:
public class Servlet extends HttpServlet(HttpServletRequest req,HttpServletResponse res)throws IOException,ServletException
{
//code
}