Java programming language

File management

Accessing files - Additional exercises

  

Exercise 1:

Create a project named RegexReader containing the following things:

Exercise 2:

Create a program called FolderCopy that copies all the files from an existing folder into another. The program must previously delete the contents of the destination folder (if any), and we assume that in the source folder there will only be files (not folders)

NOTE: Files.delete method only works on empty folders, so we need to empty the destination folder before deleting it.

Exercise 3:

Create a program called MovieManagement that stores the movies you have already watched. Define a Movie class to store movie information (title and genre). Then, the main program will try to load a file called movies.dat at the beginning, and show you your current list of movies. Finally, it will ask you if you want to enter more movies in the list. You can enter as many movies as you want, until you type an empty title. Then, the program will finish, writing the updated list in the serialized file.