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

Coderanch | sarrah gerard | 7 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Problem in Creating HashMap object then display in sorted and unsorted order

    Coderanch | 7 years ago | sarrah gerard
    java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.Integer cannot be cast to java.lang.String

      at myhashmap.MyHashMap.main()
    2. myhashmap
      MyHashMap.main
      1. myhashmap.MyHashMap.main(MyHashMap.java:44)
      1 frame