Question: Title: Using Comparable in Singly Linked List I'm writing a singly linked list that can insert, remove, search, and count. When I try to implement
Title: Using Comparable in Singly Linked List
I'm writing a singly linked list that can insert, remove, search, and count. When I try to implement generic so that the list can accept different types, the instruction requires the use of Comparable. How is Comparable used in this case (since I'm not sorting anything), and what exactly am I comparing? Do I need to "implements Comparable" or "extends Comparable"?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
