The operator > is undefined for the argument type(s) String, int

2025-03-03 18:56:52
推荐回答(1个)
回答1:

那个readLine()返回的是一个字符串吧, 不是int类型.
试一试, int i = Integer.parseInt(num);
参考:https://zhidao.baidu.com/question/144544532.html