public class Stack { public Stack () {....} public void push (E e) {....} public E pop () {....} public boolean isEmpty(){....} } public void p
the problem is that you have two types but only one generic representation (E) so E is Number as well as Integer. Thats confusing him. You need to have the same type for the collection. Rewrite it to
pushAll(Collection src)
and cast K to E.