In the above program, when im trying to compile. The error im facing is Cannot find symbol ( Set<Map.Entry<String, Double>> set = hm.entrySet();
// Display the set
for(Map.Entry<String, Double> me : set):
Symbol is: class Entry
Location: class Map.
Do you maybe have a class that you wrote yourself that is called Entry or Map? It could be that the Java compiler is picking that up instead of the class Entry or Map from the package java.util.
Make sure that you remove any class named Entry or Map that you might have in your project.
Well i even tried to copy the program file on desktop and compile it. Its still showing the same error. Well Im working on different programs not on project. Learning java from complete reference to java book. As far i searched for class on those names, there are no programs specified with that name.
Hi campbell
The version of java im using is latest JRE 7