H
hurscht344
Gast
wie kann ich eine variable hochzählen
for (Klasse auto : blub.find()) {
index++;
Auto auto = new Auto();
}
ich möchte das bei jedme durchlauf ein die variable hochgezählt wird also auto1, dann auto2 etc.
Auto auto+index = new ... geht leider nicht
for (Klasse auto : blub.find()) {
index++;
Auto auto = new Auto();
}
ich möchte das bei jedme durchlauf ein die variable hochgezählt wird also auto1, dann auto2 etc.
Auto auto+index = new ... geht leider nicht