java.lang.ClassCastException: NameRank cannot be cast to java.lang.String

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Implementing Comparable Interface with TreeSets
    via by Nathan Doe,
    • java.lang.ClassCastException: NameRank cannot be cast to java.lang.String at NameRank.compareTo(NameRank.java:1) at java.util.TreeMap.put(TreeMap.java:545) at java.util.TreeSet.add(TreeSet.java:238) at CollectionsTest.main(CollectionsTest.java:213)
    No Bugmate found.