CHAPTER 17

FILES

The ability of the computer to store alphanumeric data, graphic images, and so on in files, and its ability to retrieve the contents has revolutionized applications in almost all aspects of life. Therefore, life without files is unimaginable.

Even the programs which we write are stored in files. We write our programs in .java file. It is a text file. We compile our program and create .class file. It is a bytecode file. A file is nothing but a sequential collection of bytes stored with a name.

In Windows OS, file names have optional extension. It helps in identifying the nature of contents of the file. A .class extension tells us that this is a bytecode file. A .wav extension tells us that the file contains sound.

In this chapter, ...

Get Programming with Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.