Scanner a = new Scanner(System.in);
String i = "11,111";
System.out.print("Enter first number a:");
String b = a.next();
我想在用户提供时显示不带逗号的数字
最佳答案
您可以简单地使用String::replace
System.out.println(i.replace(",",""));
关于java - java 如何显示不带逗号的数字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56783204/