If I have a Stack class
class Stack<E> {}
now if I do:
1) Stack<Integer> s = new Stack()
2) Stack s = new Stack<Integer>()
3) Stack s = new Stack()
can anyone explain me what these interactions (generic<->raw) causes?
Mainly my doubt is on point 1. In fact if I do that the assignment it's unsafe because that stack can store types other then Integer. Yes but if I have a push method and try to store a value othern than an Integer the compiler stop me...so when I'd have that unsafe operation?