I need to assign an appointment of sort to a list of names. A maximum of 10 names per day. I was thinking of making the date into an Array so that each date would store a set of names but I am not even sure how to implement that
>Solution :
You can do it using a Hashmap for example.
Map<Date, Set<String>> namesByDate = new HashMap<Date, Set<String>>();
Date d = new Date(); // 4 July 2022
Set<String> names = new HashSet<>();
names.add("TEST1");
names.add("TEST2");
namesByDate.put(d, names);
System.out.println(namesByDate);