Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Attribute overriding

 
Kalai Selvan
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,



The above code gives the output:


Does this mean,
1] only methods get overridden and attributes are not overridden, or
2] Runtime binding of only methods occur and not of attributes.
3] And also is Runtime binding and overriding is same?

Thanks in advance.

---------------
Kalai Selvan T.
 
Mike Gershman
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does this mean,
1] only methods get overridden and attributes are not overridden, or
2] Runtime binding of only methods occur and not of attributes.
3] And also is Runtime binding and overriding is same?


1] Yes, attributes are hidden, not overridden
2] Yes, attributes are bound at compile time
3] There are other kinds of runtime binding, but they don't apply here
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic