java.lang.ClassCastException: User cannot be cast to java.lang.Comparable

Coderanch | john mater | 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

    help with loop

    Coderanch | 7 years ago | john mater
    java.lang.ClassCastException: User cannot be cast to java.lang.Comparable

    Root Cause Analysis

    1. java.lang.ClassCastException

      User cannot be cast to java.lang.Comparable

      at SortedLinkedList.add()
    2. Unknown
      SortedLinkedList.main
      1. SortedLinkedList.add(SortedLinkedList.java:8)
      2. SortedLinkedList.main(SortedLinkedList.java:40)
      2 frames