Search:

Type: Posts; User: aussiemcgr

Search: Search took 0.11 seconds.

  1. Replies
    7
    Views
    2,523

    Re: organizing linkedlist in ascending order

    Earlier I had mentioned implementing the Comparable interface in the Student class. The reason I said that was because Collections.sort() requires you to send it a list of objects that implements the...
  2. Replies
    7
    Views
    2,523

    Re: organizing linkedlist in ascending order

    Go through the LinkedList, node by node. If node.next is greater than the new node you created, new node's next is equal to node.next and node's next is equal to the new node.
  3. Replies
    7
    Views
    2,523

    Re: organizing linkedlist in ascending order

    I assume your Student object implements the Comparable object. How did you write your compareTo() method?
Results 1 to 3 of 3