public int evalRPN(String[] tokens) {
        RPNstack rs = new RPNstack();
        for(String s : tokens) {
            if(s.matches("-?[0-9]+"))
                rs.push(s);
            else {
                int x1 = Integer.parseInt(rs.pop());
                int x2 = Integer.parseInt(rs.pop());
                if(s.equals("+")) rs.push(Integer.toString(x2+x1));
                else if(s.equals("-")) rs.push(Integer.toString(x2-x1));
                else if(s.equals("*")) rs.push(Integer.toString(x2*x1));
                else if(s.equals("/")) rs.push(Integer.toString(x2/x1));
            }
        }
        return Integer.parseInt(rs.pop());
    }