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.
Private methods are not accessible outside of it's class, including to it's own subclasses. So, Overridding of a private method is not possible. Then, why Java accepts private & final kewords together in method declaration?
Note: Asking this question, because certain combination are not accepted by the java compiler like, e.g abstract & static keywords. (but don't discuss about abstract & static here, since the concepts are different in both.)
Anbudan & Mahalo,<br />Arul<br /> <br />-Not a sun certified Java professional :-)
(I had a doubt too about inner classes...) [ October 12, 2005: Message edited by: Seb Mathe ]
Joined: Aug 03, 2002
I was thinking along the same lines (without the final). The inner class cannot override the outer class's private method, but it can call it in the inner class's version of the method. final on the outer method is also redundant in this case. I just threw the idea in for consideration.