更新时间:2022-06-18 22:00:04
您应该将您的类重命名为另一个名称,也许将其命名为"IntegerMachine"而不是"Integer". Java已经有一个名为"Integer"的本机类,通过命名您自己的类,这将意味着您将调用.Integer.parseInt( ),但后者不存在.
You should rename your class to another name, perhaps call it "IntegerMachine" and not "Integer". Java already has a native class with the name "Integer", and by naming your own class the same would mean that instead of calling java.lang.Integer.parseInt(string), which you intended, you are calling .Integer.parseInt(), for which the latter does not exist.