ex: object1 = 10; object2 = 20;
private int score;
public ClassName(int points)
{
score = points;
}
//and when creating it
addObject(new ClassName(10), ..., ...); //or 20private int score;
public void setScore(int points)
{
score = points;
}
//and when creating it
ClassName obj = new ClassName();
obj.setScore(10); //or 20
addObject(obj, ..., ...);