Chapter 20: Streams and Files

The exercises here are taken from my forthcoming book The Java Developer's Resource.

Quiz

  1. What's the difference between a file and a filename? Which is more closely related to the java.io.File class?

Exercises

  1. Write a program to recursively list all the files and directories contained in a directory given on the command line.
  2. Modify the FileInfo program so that it runs as a GUI application. The user should select a file using a FileDialog and then be presented with a window that shows all the File info.
  3. Add a File menu to the above program. It should have functional New..., Open..., Close, Save and Quit methods. It should allow the user to get information about any file on their hard drive, display that information and save that information to a text file.


[ Exercises | Cafe Au Lait | Books | Trade Shows | Links | FAQ | Tutorial | User Groups ]

Copyright 1996 Elliotte Rusty Harold
elharo@sunsite.unc.edu
Last Modified August 20, 1996