Java Map Interface
Map stores key → value pairs. Keys are unique.
HashMap common; TreeMap sorted keys; LinkedHashMap keeps order.
Iterate entrySet() for both key and value.
Write one tiny example for Map Interface. Compile, print one result, and say the output out loud before you type.
Use Map Interface only when the problem needs it. Don’t force it into every program. Know one beginner trap.
Let's take this on the board with one tiny Main class — no extra files. Java Map Interface — treeMap prints keys in sorted order. Start from main, go line by line, and stop at each print. That output is the proof for Map Interface.
Say which Map keeps sorted keys (TreeMap).