method to convert from a string to an int
Possible Duplicate:
Converting string to int in java
I am trying to write a method that returns an int
from a String
variable. My method is:
public int returnInt(String s) {
}
你可以使用Integer.valueOf(String)
来做到这一点
上一篇: 如何在Java中将字符串转换为int
下一篇: 方法将字符串转换为int