你可以使用正则表达式并删除非数字。
str = str.replaceAll("\D+","");
上一篇 JavaMaven运行项目
下一篇 为什么Java类应实现可比性?
版权所有 (c)2021-2022 MSHXW.COM
ICP备案号:晋ICP备2021003244-6号