File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Attribute overriding

 
Kalai Selvan
Ranch Hand
Posts: 79
  • 0
  • 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
  • 0
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic