HashMap order isn't guaranteed. Won't menu options appear in different order each time program is run?
If a HashMap structure holds the menu options and corresponding prompt actions, the order of options written to the screen will be different (or at least not guaranteed to be the same) each time the program is run. Shouldn't we use a TreeMap instead?
Craig DennisTreehouse Teacher
Nice attention to detail!
TreeMap will make things alphabetical.
LinkedHashMap will ensure the order added is maintained.
I don't remember if we swing back and fix that or not, but if not,
LinkedHashMap is probably the way to go.
I'll add something to the teacher's notes.