[Solved] Give every new object a new attribute value (participants and start numbers)


When I understood the problem right then you can hold the last start number in a local variable:

private int lastStartNumber = 0;

private int getNextStartNumber(){
    lastStartNumber = lastStartNumber + 1;
    return lastStartNumber;
}

0

solved Give every new object a new attribute value (participants and start numbers)