wood burning stoves*
The moose likes Java in General and the fly likes rules round up question. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "rules round up question." Watch "rules round up question." New topic
Author

rules round up question.

peter cooke
Ranch Hand

Joined: Mar 16, 2004
Posts: 314
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
gkumar kumar
Greenhorn

Joined: May 01, 2007
Posts: 8
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.


Thanks&Regards,<br />gkumar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: rules round up question.
 
Similar Threads
Combining State and Singleton design patterns
Rules Round Up Game ( Question No.235)
Inner class question in Rules Round-up
Doubt in innerclass
outer class from inner class