Authored by mali

测试代码

... ... @@ -10,6 +10,28 @@ import java.util.List;
public class Test1 {
// 搜索查询的数据,抽取商品编码
public static void main(String[] args) throws IOException {
String fileName = "D:\\tmp\\已存在的货号.txt";
BufferedReader stream = new BufferedReader(new FileReader(fileName));
List<String> idList = new ArrayList<>();
String line;
for (;(line=stream.readLine())!=null ; ) {
idList.add(line.trim());
}
BufferedReader stream1 = new BufferedReader(new FileReader("D:\\tmp\\整体的货号.txt"));
for (;(line=stream1.readLine())!=null ; ) {
if(idList.contains(line)) {
continue;
}
System.out.println(line);
}
}
private static void method1() throws IOException {
String fileName = "C:\\Users\\li.ma\\Desktop\\result.json";
BufferedReader stream = new BufferedReader(new FileReader(fileName));
... ...