Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in john meyers' question...

 
Gabriel Ozeas
Ranch Hand
Posts: 30
Google App Engine Hibernate jQuery
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks, i have a doubt about modifiers in this question from john meyers



why the compare method can access t1.x and t2.x if they are private? i compile and run this code but no compiler or runtime error appeared...

thxz everyone!
 
chander shivdasani
Ranch Hand
Posts: 206
Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
private members of a class can be accessed by the methods of the same class
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic