思路:
1.读入文件
2.按行读,每行以空格分割得到str数组
3.将str数组中每个单词添加到hashmap
4.遍历hashmap,value为1的输出,并统计个数
//一段英文中找无重复单词及个数
public static void findSingleWord() throws IOException{
File file = new File("e:/info.log");
BufferedReader br = new BufferedReader(new FileReader(file));
Map<String,Integer> map = new HashMap<>();
String line = br.readLine();
while(line!=null){
String[] arr=