java.lang.ClassCastException: java.lang.String

Oracle Community | 807541 | 1 decade 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

    Sorting

    Oracle Community | 1 decade ago | 807541
    java.lang.ClassCastException: java.lang.String

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.String

      at Sample.StringCompare2.compare()
    2. Sample
      StringCompare2.compare
      1. Sample.StringCompare2.compare(SortCompare.java:61)
      1 frame
    3. Java RT
      Arrays.sort
      1. java.util.Arrays.mergeSort(Arrays.java:1181)
      2. java.util.Arrays.sort(Arrays.java:1128)
      2 frames
    4. Sample
      SortCompare.main
      1. Sample.SortCompare.main(SortCompare.java:45)
      1 frame