Hello,
I have a set of objects that are affecting the scores and I need a structure that allows me to ensure the uniqueness of objects and order them. For cons, the uniqueness is on the subject and covers score.
So I created a class that contains the object and its score:
And i am getting an error for this, any one has any idea about this.Code:class element { private Object ob; private double sc; Public boolean equals(Object o) { return ob.equals(((element)o).getObjet()); } }
Bookmarks