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

what are the parts forwarded to node from root class?  RSS feed

 
John Batista
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lets say we have root class that has the following parts : instance variable (all flavours : public, protected, default and private), instance method (also all flavours), static var and methods (all flavours), inner classes, init block and enums. which of these parts are forwarded to its node classes (node extends root)? thanks
 
John Batista
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, I've got it. sorry. next time i'll try googling first before throeing questions here. thanks
 
Campbell Ritchie
Marshal
Posts: 55717
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By "root" and "node", you appear to mean "superclass" and "subclass". The private members are not inherited, and for such inheritance, the rules are in the Java™ Language Specification. It says "examples" in the JLS contents, which might mean you can actually read and understand them
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!