Wednesday, August 29, 2007

Calling methods from base class in Java

Don't forget that you can call method from the base class when you are overriding this method in derrived class! Simply use "super" operator for this purpose.


public AuthToken createAuthToken(HttpServletRequest request, HttpServletResponse response) throws UnauthorizedException{
...
//calling method from base class
return super.createAuthToken(request, response);
}

No comments: