A simple mathematical evaluator that uses stacks in Java