• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

multilevel inheritance in java

 
nagu datla
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to invoke the members of a super class(multilevel) in java.give an example .

If class b extends a and class c extends b then how to invoke the members of the class a in c .
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by nagu datla:
...If class b extends a and class c extends b then how to invoke the members of the class a in c...

Welcome to JavaRanch!

Have you tried writing some code to test this? It's easier than you think. C inherits all that is in A, so unless the member is private, it should be readily accessible.
[ January 27, 2008: Message edited by: marc weber ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic