字符串转换为别的类型杂转换?给忘了....
比如说:
String temp = JOptionPane.showInputDialog("Please input the numbers:");
当输入一个值之后,肯定是String类型的啦,我想将它转换为其他类型,应该杂转换,给忘了,汗~~~~
在线等 ``````
----------------解决方案--------------------------------------------------------
问题已解决.
只要引用 java.long.* 包即可 里面包含字符串转换...
String temp = JOptionPane.showInputDialog("Please input the numbers:");
Int demo1 = Integer.parseInt(temp);
Double demo2= Double.parseDouble(temp);
其他的类似.
----------------解决方案--------------------------------------------------------