Involves Stack, push and pop
Hi, I have this exercise which I'm not sure how to approach:
Evaluate the following expresion, where '+' menas "push the following letter onto the stack," and '-' means "pop the top of the stack and print it": "+U+n+c+e+r+t+a-+i-+n+t+y+ -+r+u--+l+e+s"
publicclass Ex15{
publicstaticvoid main(String[] args){
Stack<String> stack =new Stack<String>();
String str ="+U+n+c+e+r+t+a-+i-+n+t+y+ -+r+u--+l+e+s";
}
}
Not sure if I'm supposed to use String.split() somehow in an if statement? How do I actually evaluate this so that I can push or pop where necessary? Any help appreciated

