aspose file tools*
The moose likes Beginning Java and the fly likes implementation inheritance vs type inheritance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "implementation inheritance vs type inheritance " Watch "implementation inheritance vs type inheritance " New topic

implementation inheritance vs type inheritance

Stanley Walker
Ranch Hand

Joined: Sep 23, 2009
Posts: 87
i came across these two terms, implementation inheritance and type inheritance, while going throught the Timestamp API.
can anyone please explain what do they actually mean.
my inference is that implementation inheritance is using interfaces implementation and type inheritance is sub classing. am i right.
what is the meaning and signigifance of these two concepts and whcih is better to use..?
Alan Colette

Joined: Sep 18, 2014
Posts: 1
You're close, but I think you have it backwards.

"An object's class defines how the object is implemented. In contrast, an object's type only refers to its interface. Class inheritance defines an object's implementation in terms of another object's implementation. Type inheritance describes when an object can be used in place of another."

The answer to "which is better" depends on what you're doing. Neither is universally best.
I agree. Here's the link:
subject: implementation inheritance vs type inheritance