Hello and apologies for this noob question!
I'm going through Charles Lyons OCEJWCD Study Companion...
I've just finished Chapter 6 Revision Questions and 2 questions I don't seem to understand. Q17 & Q18 (p153).
I understand why and the use of Wrappers, just not the syntax of the constructor he calls in the above questions.
In the book for Q17 & Q18 (p153) it has :
I thought the constructor would be :
i.e passing the interface type HttpServletRequest so it can get stored on the ServletRequestWrapper instance variable.
Or is his code correct due to HttpServletRequestWrapper passes the IS-A
test and is a HttpServletRequest by virtue of HttpServletRequestWrapper implementing HttpServletRequest which extends ServletRequest.??
Sorry . . . confused.com, or I'm just too fried! :-)
Thank you. :-)