• Post Reply Bookmark Topic Watch Topic
  • New Topic

Apart from instance variables and methods, what else can a sub class inherit from a superclass  RSS feed

 
John McDowell
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I came across a line in head first java edition 2 which stated that there is something else that could be inherited. What is it?
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John McDowell wrote:I came across a line in head first java edition 2 which stated that there is something else that could be inherited. What is it?

Well, one thing that comes to mind is its type. A subclass can be cast to a supertype - and that includes any interfaces it implements.

Winston
 
Campbell Ritchie
Marshal
Posts: 56570
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this Java Language Specification section.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!