I found this and it seems to be working, I’m trying to iterate trough HashMap :
But this portion of code shows warnings and I don’t have a clue how to make it not show them :
Iterator it = map.entrySet().iterator();
Map.Entry pairs = (Map.Entry) it.next();
Is there a way to “fix” this without using suppressWarnings annotation ?
Yes, use the correct generic definitions of
itandpairs– assumingmapis correctly defined.For example: