1. Learn
  2. /
  3. Courses
  4. /
  5. Input/Output and Streams in Java

Connected

Exercise

Verifying note locations

Before accessing a saved note, your app should confirm it's where it should be. In this final exercise, you'll check whether specific files and folders exist and print relevant messages, just like verifying shelves before filing paper notes.

Instructions

100 XP
  • Create a File object notesDir that points to notes.
  • Create a new directory named notes.
  • List all contents of the directory named notes.
  • Retrieve the absolute path of the file named "note.txt".