I am trying to create a class say MyStack
that would implement a java.util.collections class. MyStack
will override some methods of the collections cl
You were VERY close!
You just need to define E in your subclass as well:
public class MyStak implements java.util.Collection
The idea is that you could have a subclass with, say,
, and you implement two different interfaces, one using E, one using F. That, or MyStak could be specialized and use a specific class for Collection
, instead of a generic E
.