This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
I had some time and played the rules round up. One of the question has me puzzled. Hoping someone could provide me with an explanation. I don't have the exact wording but the gist
Given a Class (outer) with a private method and an inner class (inner). Can the inner class redefine behavior of the private method in the outer class.
Are they talking of something like... (if so why would you ever want to do this
CIAO Peter M. Cooke
posted 8 years ago
Hi, Methods and varialbles of outer class can be accessed directly by inner class. But inner class variables and methods can't be accessed by outer class directly and inorder to access, inner class should be instansiated in outer class then only inner class methods can be used.
So here we can define same function with 2 different functionalities,just like overriding.