Read section 6.2 on using stacks to evaluate postfix expressions. Grab the authors' code from chapter 6 for Postfix.java and PostfixEvaluator.java. You will need to make a small number of changes:
try {
op2 = (stack.pop()).intValue();
op1 = (stack.pop()).intValue();
}
catch (EmptyStackException ese) {}