Why Stack in java cannot be created with type parameter(generic) -
stack
generic class in java, definition class stack<e> extends vector<e>
, why cannot instantiate type parameter stack<integer> s = new stack<>();
vector
can?
of course, can.
stack<integer> stack = new stack<>();
Comments
Post a Comment