Create a text-based notes manager using Java File I/O, allowing users to add and view notes with file read/write functionality.
- Language: Java
- IDE: VS Code
- Execution Terminal / Command Prompt
-
Add Note
- Users can type a note and save it to a text file (
notes.txt). - Notes are appended, so previous notes are not overwritten.
- Users can type a note and save it to a text file (
-
View Notes
- Users can view all previously saved notes.
- Notes are read from the file line by line.
-
Exit
- Exit the application safely.
-
Compile the Java files:
javac JavaNotesApp/NotesApp.java
-
Run the Program:
java JavaNotesApp/NotesApp
-
Follow the menu to perform operations:
<--- Java File I/O - Notes App ---> Select an option to perform task. 1. Add Note 2. View Notes 3. Exit Enter your choice---: 1 Enter your note (type 'END' on a new line to finish): Hi, my name is Rohan Gusain, and I'm from Pauri, Uttarakhand. END Note added successfully. ----------------------------------------- Select an option to perform task. 1. Add Note 2. View Notes 3. Exit Enter your choice---: 2 --- Your Notes --- - Hi, my name is Rohan Gusain, and I'm from Pauri, Uttarakhand. -----------------------------------------