How can I convert a String
to an int
in Java?
My String contains only numbers, and I want to return the number it represents.
For example, given the string "1234"
the result should be the number 1234
.
转载于:https://stackoverflow.com/questions/5585779/how-do-i-convert-a-string-to-an-int-in-java