My program requires me to keep count of an audience and add their number into an array.
count increases by one every time the user purchases a ticket. I can't find the way to initialize the values here.
count = 9;
long [] audienceInfo = new long[count];
audienceInfo[count] = { 1, 2, 3, 8, 9, 10, 15, 16, 17, 12 };
The error I'm receiving is "Array constants can only be used in initializers" Any help is appreciated. Thank you!
Edit: Thanks for the help. I used ArrayList and it solved my problems