Facebook
From BONZOJAVA, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 202
  1.     public int compareTo(Osoba other)
  2.     {
  3.         Student otherStudent = (Student) other;
  4.        
  5.         if(this.sredniaOcen<otherStudent.sredniaOcen)
  6.             return super.compareTo(other);
  7.         else if(otherStudent.sredniaOcen<this.sredniaOcen)
  8.             return super.compareTo(other);
  9.         return super.compareTo(other);
  10.        
  11.         //Student otherStudent = (Student) other;
  12.         //return Double.compare(this.sredniaOcen, otherStudent.sredniaOcen);
  13.     }