What does implementation inheritance mean in the javadoc of java.sql.Timestamp? -
from javadoc of java.sql.timestamp class(emphasis mine)
due differences between timestamp class , java.util.date class mentioned above, recommended code not view timestamp values generically instance of java.util.date. the inheritance relationship between timestamp , java.util.date denotes implementation inheritance, , not type inheritance.
what mean implementation inheritance , not type inheritance? case of has-a vs is-a?
basically, documentation states fact java.sql.timestamp extends java.util.date implementation detail, , should not use timestamp instances expect date's functionality. presumably, if java had option (like c++ does), timestamp privately inherit date.
Comments
Post a Comment