Search:

Type: Posts; User: sonicjr

Search: Search took 0.14 seconds.

  1. Replies
    9
    Views
    1,924

    Re: Understanding the Comparable Interface

    This is what I was trying to do before I replied, and I still can't find it. Here is the code for Collections.sort():



    public static <T extends Comparable<? super T>> void sort(List<T> list) {...
  2. Replies
    9
    Views
    1,924

    Re: Understanding the Comparable Interface

    Thanks, but I still don't totally understand how Collections.sort() results in compareTo() being called. Could you be more detailed than "due to inheritance"? I'm looking at the Oracle Docs and I...
  3. Replies
    9
    Views
    1,924

    Understanding the Comparable Interface

    I am a new programmer learning about interfaces, and I was wondering if someone could explain how exactly the Comparable interface works. For example, I have two classes, one which implements...
Results 1 to 3 of 3