你能解释一下输出吗?
String str = "Total Amount is AMOUNT";
String amount = "$10.00";
str = str.replaceAll("AMOUNT", amount);
System.out.println(str);
Run Code Online (Sandbox Code Playgroud)
什么是输出?它抛出异常
Exception in thread "main" java.lang.IndexOutOfBoundsException: No group 1
Run Code Online (Sandbox Code Playgroud)
通过删除$的工作.为什么?
java ×1