This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

rules round up question.

 
peter cooke
Ranch Hand
Posts: 317
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
gkumar kumar
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic