It would help if you went back to the JavaDocs for HashMap (←click that link) to see exactly which is the key and which is the value. Then understand that the
enhanced for-loop requires a collection or array on the right side of the colon. You currently specify the nonexistent variable
s there which obviously doesn't work. When the compiler says it can't resolve a name, that means it can't find where you declared it in the current scope. In your code, what is the collection that you want to iterate over with the for loop?