yogeshkumarsaini/Phonebook-Application
Java OOP-based phonebook with search, favorites, grouping, CRUD & file storage
๐ฑ Phonebook Application
A feature-rich console-based Phonebook application built using Java, OOP, Collections, and File Handling.
It allows users to manage contacts efficiently with sorting, searching, grouping, favorites, and persistent storage.
โจ Features
โ
Add new contact
โ
View all contacts (sorted AโZ)
โ
๐ Group contacts by first letter
โ
๐ Search by name
โ
๐ฑ Search by phone number
โ
โญ Mark contacts as favorite
โ
๐ Update contact
โ
โ Delete contact
โ
๐ Indian phone number validation
โ
๐พ Data stored using file handling
โ
๐งฑ Object-Oriented design
โ
๐ Menu-driven interface
๐๏ธ Project Structure
PhoneBook/
โโโ Contact.java
โโโ PhoneBook.java
โโโ Main.java
โโโ contacts.dat (auto-generated)
๐ ๏ธ Technologies Used
- Java
- OOP (Encapsulation, Abstraction, Comparable)
- Collections Framework (ArrayList, TreeMap)
- File Handling (Serialization)
- Regex (for phone validation)
๐ฑ Indian Phone Number Validation
Valid formats:
9876543210919876543210+919876543210
Invalid numbers are rejected.
โถ๏ธ How to Run
1๏ธโฃ Compile
javac *.java2๏ธโฃ Run
java Main๐ธ Sample Menu
๐ฑ PHONEBOOK MENU
1. Add Contact
2. View All Contacts
3. Group by First Letter
4. Search by Name
5. Search by Phone
6. Mark Favorite
7. Update Contact
8. Delete Contact
9. Exit
๐พ Data Storage
All contacts are saved in:
contacts.dat
So data remains available after restarting the program.