let's say i have
public static Set<Cat> createCats() {
HashSet<Cat> result = new HashSet<Cat>();
for (int i = 0; i < 4; i++) {
Cat cat= new Cat();
result.add(cat);
}
and i want to add to this set cat0, cat1,cat2, cat3
public static Set<Cat> createCats() {
HashSet<Cat> result = new HashSet<Cat>();
for (int i = 0; i < 4; i++) {
Cat cat /* + i */ = new Cat();
result.add(cat /* + i */);
}