for (int i = 0; i < 10; i++) {
Ticket t1 = new Ticket();
}
I have created class Ticket
and I need to create 10 tickets in a loop, but I have a problem with name for that object. In this code that I write above name for object is t1
. I am wondering if there is a way to change this name every time when I'm creating new object in loop for.