There is an insignificant increase in memory usage due to the fact that you have an extra class to load. If you have 100 subclasses of Item
, you would have 100 extra classes to load ... and if you take it far enough the extra memory usage for the extra code will be significant.
However, an instance of Example
will occupy the same space as an instance of Item
because Example
does not declare any instance fields. Note that extra methods or method overloads do not contribute to the size of an instance.