import java.util.*;
public class Homework11 {
Scanner input = new Scanner(new File("keyvalues.txt"));
Map<String, Integer> wordCountMap = getCountMap(in);
for (String word: wordCountMap.keySet()) {
int count = wordCountMap.get(word);
while (input.hasNextLine()) {
line = input.nextLine();
numLine++;
Scanner word = new Scanner(line);
while (word.hasNext()){
String nextWord = word.next();
numWord++;
numChar = numChar + nextWord.length();
}
if (wordCountMap.containsKey(name)) {
double word = wordCountMap.get(name);
System.out.println(name + "'keyword is $" );
} else {
System.out.prinln("that wont work " + name);
}
}
}
}
just have a problem with for (String word: wordCountMap.keySet()) {
i hope thats it