diff --git a/core-java-collections/src/main/java/com/baeldung/sort/SortHashMap.java b/core-java-collections/src/main/java/com/baeldung/sort/SortHashMap.java index 938f740e9a..c803e8f193 100644 --- a/core-java-collections/src/main/java/com/baeldung/sort/SortHashMap.java +++ b/core-java-collections/src/main/java/com/baeldung/sort/SortHashMap.java @@ -63,8 +63,8 @@ public class SortHashMap { } private static void treeSetByKey() { - SortedSet keys = new TreeSet<>(map.keySet()); - System.out.println(keys); + SortedSet keysSet = new TreeSet<>(map.keySet()); + System.out.println(keysSet); } private static void treeMapSortByKey() {