我不太确定这段代码做错了什么。
我正在尝试导入 joptionpane,然后将字符串转换为 int 我的错误出现在
**start = inputValue.Integer.parseInt();**
JOptionPane pane = new JOptionPane();
String inputValue = JOptionPane.showInputDialog("Please input a value");
start = inputValue.Integer.parseInt();
最佳答案
试试这个:
start = Integer.parseInt(inputValue);
关于java joption并将字符串转换为整数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5629134/