Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含十进制数字的文本文件。我正在尝试Integer.valueOf()在 Java 程序中使用,它不会转换十进制数。
Integer.valueOf()
如何将十进制数字字符串转换为int?
您可以改用Double.valueOf() 此处定义的 java ;然后您可以将生成的 double 转换为 int。
Double.valueOf()