This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a couple of questions on questions 5 and 6 regarding Filters and Wrappers. The questions are on p 699
Question 5: Which about filters are true? The answers for the question are A and G. But I was wondering about D: Filters support an initialization mechanism that includes an init() method that is guaranteed to be called before the filter is used to handle requests.
The filter does has an init() method and is called before the filter is used to handle requests. Is the above answer also correct for that question?
Question 6: Which are true about the servlet Wrapper classes? The answers for the question is C. But I was wondering about F: When you subclass a wrapper class, you must override at least one of the wrapper class's methods.
If you don't override any methods in your wrapper class, it still shows the same behaviour of the wrapped object, hence you must override one of the class's methods in order to have a specialised object.
About question 6, what you said is true, I mean, if you don't override, you don't specialize it. But when they ask must, it means, the implementation won't work at least you do that and the implementation work even if you don't override any method, that's why this answer is wrong.