内容一

内容二

根据以下功能描述补全代码:
图中橙色方框内为需补充部分。
20155223 第十一周课堂编码

补全后的代码片段:

while (tokenizer.hasMoreTokens()) {
            token = tokenizer.nextToken();


            if (isOperator(token)) {
                op2 = (stack.pop()).intValue();
                op1 = (stack.pop()).intValue();
                result = evalSingleOp(token.charAt(0), op1, op2);
                stack.push(new Integer(result));
            } else {
                stack.push(new Integer(Integer.parseInt(token)));
            }

        }

补全代码后的运行截图:
20155223 第十一周课堂编码

相关文章:

  • 2021-09-12
  • 2021-10-08
  • 2021-12-31
  • 2021-12-19
  • 2021-08-05
  • 2022-12-23
  • 2021-09-30
  • 2021-12-01
猜你喜欢
  • 2021-07-26
  • 2022-01-24
  • 2022-02-19
  • 2021-10-25
  • 2022-12-23
  • 2022-01-02
  • 2021-11-30
相关资源
相似解决方案