Is there a way to make objects with for loop with different names
Hello to who is seeing this thread,
Sorry about that funny problem. For example I have a customer class and need to make any number customer. I have an array of strings and want to make these strings customers object name.
Like this if possible.
for (int i = 0; i < number; i++)
Customer stringArray[i] = new Customer();
It wont work. Because of types. (String, Customer)
I can make firstly customers. customer1, customer2, customer3 and more. But I dont want to make more objects. Just need objects about an exact number.