参照:https://jingyan.baidu.com/article/f3ad7d0fa291c849c2345b1a.html
代码如下:
package com.atguigu;
public class test {
public static void main(String[] args) {
for (int i = 0; i < 10; i++) {
System.out.println("{\n" +
" \"appNo\" : \"a${num}"+i+"\",\n" +
" \"applicantCredentialCode\" : \"\",\n" +
" \"applicantCredentialNo\" : \"\",\n" +
" \"applicantName\" : \"\"\n" +
"},");
}
}
}
其中需要注意:
\"a${num}"+i+"\" 本来应该是 \"a${num}\"在中间加上"+i+"