User Tools

Site Tools


java:jfc_intf_sort

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
java:jfc_intf_sort [2021/04/05 06:59]
gthanos [Συγκρίνοντας με χρήση ενός Comparator object]
java:jfc_intf_sort [2021/04/05 07:13]
gthanos
Line 42: Line 42:
      
   public boolean equals(Object o) {   public boolean equals(Object o) {
 +    if(o == null)
 +      return false;
     return (o instanceof Student && o.hashCode() == this.hashCode());     return (o instanceof Student && o.hashCode() == this.hashCode());
   }   }
java/jfc_intf_sort.txt · Last modified: 2021/04/05 06:13 (external edit)