السلام عليكم ورحمة الله وبراكاته
أريد شرح هدا الكود
public class Joueur Implements Comparable {
int reg;
int departement;
int point;
String nom;
.......
Public Int CompareTo(Joueur autreJoueur)
{
int resultat;
if (this.point > autrejoueur.point)
resultat = 1;
if (this.point < autrejoueur.point)
resultat = -1;
if (this.point == autrejoueur.point)
resultat = 0;
return resultat;
}
}أريد فقط الفرق بين this.point و autrejoueur.point
public class execl{
ArrayList LesJoueurs = new ArrayList();
........
LesJoueurs.Add();
LesJoueurs.Add();
LesJoueurs.Add();
LesJoueurs.Add();
........
LesJoueurs.Sort();
}جزاكم الله كل الخير