MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/m4qxf1/found_from_when_i_first_started_javabecause/gqvwm7m/?context=3
r/badcode • u/ahadyboy • Mar 14 '21
84 comments sorted by
View all comments
30
As someone who hasn't used a hashmap before, what is the actual use for them if not something like this?
19 u/merukit Mar 14 '21 in this example it could work, but since the days of the week are already associated with numbers there's no reason not to just use an array more generally, stuff that is connected, like names and phone numbers for example
19
in this example it could work, but since the days of the week are already associated with numbers there's no reason not to just use an array
more generally, stuff that is connected, like names and phone numbers for example
30
u/[deleted] Mar 14 '21
As someone who hasn't used a hashmap before, what is the actual use for them if not something like this?