Files

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   go to next page        

Answer:

A file is a semi-permanent, named collection of information.

Files

A file is a semi-permanent, named collection of information.

  • semi-permanent: Files are usually stored on magnetic disk where they will remain for years even when the power is off. Of course, a file can be deleted (sometimes by accident) so they are semi-permanent, not permanent.
  • named: A file has a name that is used to find it when it is needed. You probably know that MS Windows file names look like:
    • mydata.txt
    • program1.java
    • program1.class
    • doom.exe
    • ... and so on
  • collection of information: The purpose of a file is to contain a collection of related information, such as a word processing document, a program source file, a spread sheet, a data base, and so on.

This is a conceptual definition of what a file is. It says what a file is and how it is used. A file can be implemented in many ways: as sections of a hard disk, as sections of a DVD, as part of a magnetic tape, and in other ways.

QUESTION 2:

Is there another way (other than files) for a computer system to keep information semi-permanently?