Uncategorized

What is the difference throw and throws?

throws: Used in a method’s signature if a method is capable of causing an exception that it does not handle, so that callers of the method can guard themselves against that exception. If a method is declared as throwing a particular class of exceptions, then any other method that calls it must either have a try-catch clause to handle that exception or must be declared to throw that exception (or its superclass) itself.

A method that does not handle an exception it throws has to announce this:

public void myfunc(int arg) throws MyException {         …     }

throw: Used to trigger an exception. The More >

jsp tags

What are the different types of JSP tags?

The different types of JSP tags are as follows: