62,616
社区成员
发帖
与我相关
我的任务
分享
Scanner sc = new Scanner(new File("C:/test.txt"));
while(sc.hasNextLine()){
System.out.println(sc.nextLine());
}
name
address
ip
while (scan.hasNext()) {
String sourse = scan.next();
for (int i = 0; i < name.length; i++) {
String target = name[i];
System.out.println("人物 " + target + " 出现的次数: " +stringFind( sourse, target));
}
}