you mean that I should have "Comparable" class inside "Student" class that implements a compareTo() method?
Type: Posts; User: mia_tech
you mean that I should have "Comparable" class inside "Student" class that implements a compareTo() method?
the only way I can use the "compareTo" method I implemented in the student class is if I use like this
public void add(Student s)
{
Node newNode = new Node(s);
...
forgot to mentioned it... it is implemented in the Person class
//method to compare student names
public int compareTo(String fn, String ln)
{
return...
guys, I have the following method (add), and as I'm adding values to the list I need to order in ascending order based on firstNmae+" "+lastName. I tried using the Collections.sort(students) in the...