Skip to content

jaichanaditya03/Java-File-i-o-Notes-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

NotesApp - Java File I/O Notes Manager 📝

A simple console-based notes management application written in Java that demonstrates file I/O operations using FileWriter and FileReader/BufferedReader.

🌟 Features

  • Create Notes: Write new notes with custom titles
  • Append to Notes: Add content to existing notes
  • List All Notes: View all saved note files
  • Read Notes: Display the contents of any note
  • Delete Notes: Remove notes with confirmation
  • Search Notes: Find text across all notes (case-insensitive)
  • Auto Directory Creation: Creates notes folder automatically
  • Safe Filenames: Sanitizes titles to prevent filesystem issues

🛠️ How to Build & Run

Prerequisites

  • Java JDK 8 or higher
  • Command line access (PowerShell/Terminal)

Build and Run

# Compile the Java file
javac NotesApp.java

# Run the application
java NotesApp

📱 Application Screenshots

Main Menu

Main Menu The main menu showing all available options

Creating a Note

Creating Note Creating a new note with title and content

Listing Notes

List Notes Viewing all saved note files

Reading a Note

Read Note Displaying the contents of a selected note

Searching Notes

Search Notes Searching for text across all notes

🎯 Usage Guide

Menu Options:

  1. Create new note (overwrite if exists): Enter a title, then type content line by line. End with a single dot . on its own line
  2. Append to existing note: Same as create, but adds content to existing file
  3. List all notes: Shows all .txt files in the notes directory
  4. Read a note: Select and display a note's contents
  5. Delete a note: Remove a note file (with confirmation)
  6. Search notes: Find text within all notes (case-insensitive matching)
  7. Exit: Close the application

Example Usage Flow:

  1. Choose option 1 to create a new note
  2. Enter title: My First Note
  3. Type your content (multiple lines supported)
  4. End with . on a new line
  5. Use option 3 to list your notes
  6. Use option 4 to read your note back

🏗️ Technical Details

File I/O Implementation:

  • FileWriter: Used for writing and appending content to note files
  • FileReader + BufferedReader: Used for reading note contents efficiently
  • File Operations: Automatic directory creation, file listing, deletion
  • Error Handling: Try-catch blocks for all file operations

File Structure:

project-folder/
├── NotesApp.java      # Main application file
├── README.md          # This file
└── notes/            # Auto-created directory for note files
    ├── note1.txt
    ├── note2.txt
    └── ...

🔧 Code Features Demonstrated

  • File I/O Operations: Reading and writing text files
  • Directory Management: Creating and managing file directories
  • User Input Handling: Scanner for console input
  • String Processing: Filename sanitization and text searching
  • Exception Handling: Proper error handling for file operations
  • Menu-driven Interface: Console-based user interaction

📋 Requirements Met

✅ Working .java file using FileReader/FileWriter
✅ Text-based notes manager functionality
✅ File read/write operations demonstrated
✅ User-friendly console interface
✅ Error handling and input validation

🚀 Future Enhancements

  • Export all notes to a single file
  • Import notes from text files
  • Note categories/tags
  • Date/time stamps for notes
  • Backup and restore functionality
  • Configuration file support

📄 License

This project is created for educational purposes to demonstrate Java File I/O operations.


Created as part of Java File I/O learning exercises

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages