public int evalRPN(String[] tokens) {
        stack.clear();
        Integer tempVal, leftVal, rightVal;
        for (String token : tokens) {
            if (isOperator(token)) {
                if (stack.size() >= 2) {
                    rightVal = Integer.parseInt(stack.pop());
                    leftVal = Integer.parseInt(stack.pop());
                    tempVal = getResult(token, leftVal, rightVal);
                    stack.push(String.valueOf(tempVal));
                } else {
                }
            } else {
                stack.add(token);
            }
        }
        return Integer.parseInt(stack.pop());
    }