java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.Comparable;

Coderanch | Krep Lock | 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

    Generics and Comparable

    Coderanch | 7 years ago | Krep Lock
    java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.Comparable;
  2. 0

    Generics and Comparable

    Coderanch | 7 years ago | Istvan Kovacs
    java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.Comparable;

    Root Cause Analysis

    1. java.lang.ClassCastException

      [Ljava.lang.Object; cannot be cast to [Ljava.lang.Comparable;

      at MyListADT.<init>()
    2. Unknown
      TestProg.main
      1. MyListADT.<init>(MyListADT.java:39)
      2. MyArrayList.<init>(MyArrayList.java:12)
      3. TestProg.main(TestProg.java:11)
      3 frames