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...
Type: Posts; User: aussiemcgr
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...
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.
I assume your Student object implements the Comparable object. How did you write your compareTo() method?