java.lang.ClassCastException: java.lang.Integer cannot be cast to EmpClass

Coderanch | Graeme Byers | 9 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    ClassCastException

    Coderanch | 9 years ago | Graeme Byers
    java.lang.ClassCastException: java.lang.Integer cannot be cast to EmpClass

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.Integer cannot be cast to EmpClass

      at EmpNameComparator.compare()
    2. Unknown
      EmpNameComparator.compare
      1. EmpNameComparator.compare(CompTest.java:53)
      1 frame
    3. Java RT
      TreeMap.put
      1. java.util.TreeMap.put(Unknown Source)
      1 frame
    4. Unknown
      CompTest.main
      1. CompTest.main(CompTest.java:12)
      1 frame