如何在Java中將String轉換爲int? - How do I convert a String to an int in Java?

問題:

How can I convert a String to an int in Java? 如何在Java中將String轉換爲int spa

My String contains only numbers, and I want to return the number it represents. 個人字符串僅包含數字,我想返回它表明的數字。 .net

For example, given the string "1234" the result should be the number 1234 . 例如,給定字符串"1234" ,結果應爲數字1234 code


解決方案:

參考一: https://stackoom.com/question/NR7D/如何在Java中將String轉換爲int
參考二: https://oldbug.net/q/NR7D/How-do-I-convert-a-String-to-an-int-in-Java
相關文章
相關標籤/搜索