Here is the link program working be like:
👉 https://onlinegdb.com/wDMXT9Imd
This Java console application provides a simple Contact Management System with the following features:
- Add Contact:Add new contact details.
- View Contacts:Display all stored contacts.
- Search Contact:Find a contact by name.
- Update Contact:Modify existing contact details.
- Delete Contact:Remove a contact by name.
- Exit:Exit the application.
- Java Basic
- Object Oriented Programming
- Encapsulation
- Constructor
- TreeMap
// TreeMap for storing 
 private TreeMap<String, Contact> contactMap = new TreeMap<>(); // Traversing in map
for (Map.Entry<String, Contact> entry : contactMap.entrySet()) {
    System.out.println(entry.getValue());
   }