Look at your program and imagine what happens when it runs.
In line 19, you assign to
s the value "1+2+3+4+5+6+7+8+9".
In lines 30 - 43 you loop over the characters in the
string s. It starts with the first character, which is "1".
In line 32 you check if the character is '+'. It is '1', so it goes to the "else" in line 37.
In line 37, you pop the stack. But at that point there is nothing on the stack; you just created an empty stack on line 28 and didn't push anything onto it. So you get an EmptyStackException, which is where the "stack is empty" message comes from.