Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

instance variables and run time polymorphism

 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if instance variable doesnt exhibit run time polymorphic behaviour like static variables even though they belong to an instance and not a class
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the question?
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no unlike overridden methods in inheritance,the redeclared variables wont be decided at runtime(for eg to a base class reference we assign a derived class instance the instance variable values will be that of base class),any specific advantage
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic