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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -