In the future, please don't hijack someone else's topic. I've moved this for you.
What's the problem you have? One thing I can see that's wrong is that you've abbreviated System.out.println. This is not ok in Java, you must explicitly spell out all identifiers. Another thing that I can see is that you've forgotten the generic parameters. I'm not sure why you would want to add both integers and strings to the same stack, that's generally not a good idea. However, you can use the base class Object as the generic parameter you.
Stack<Object> stack = new Stack<Object>();