I'm familiar with Python, where you can make a list of values:[3, 22, 1, 88] and even makes lists of lists: [[1, 2], ["A", "dog", 33],[1, 2, 3, 4]]
And those can put put into pretty much anything.
In Java, I've created a Object class that holds a bunch of info for an activity, and I'm trying to come up with a way to store the days of the week (Mon, Tues, Wed, etc) that the activity happens on, as well as the dates of the month it can happen on (1st, 23rd, 29th).
Was was thinking I'd store them in an arraylist, then use .contains to see if a particular day is in that object. So if the activity was scheduled for Mondays, Tuesdays, and Fridays, I'd create an arraylist of strings with "Monday", "Tuesday", and "Friday" in it, and put the arraylist into the object.
Or I could do an array with 7 indexes (0 for Monday, 1 for Tuesday...6 for Sunday) and store a Boolean in each index location based on which days are in that activity. Then I could just pull that index to see if the activity is scheduled for that day.
But can I store that array in the object? The object has a string for mActivityName, mActivityLocation, int mNumberOfPeople, and so on. Can I shove the array in as mDaysOfWeek? If so, how?
Thanks so much, Seth