Text 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:

No. At the hardware level each file is a collection of bytes. But Notepad can make no sense of the bytes intended for MS Word.

Text Files

MS Word uses some byte patterns to indicate formatting and font information. Notepad is not written to deal with this information and will not work correctly with a file that contains it. This is somewhat like a book written in English and a book written in Latin. The same book shelf could hold both books and both books use the same characters printed on paper. But some readers can only process the book written in English.

A text file is a file that contains bytes that represent:

  • characters 'A' through 'Z'
  • characters 'a' through 'z'
  • characters '0' through '9'
  • the space character
  • punctuation and symbols like . , : ; " + - $ (and others)
  • a few control characters that represent end of lines, tabs and some other things.

Text files are the easiest type of files for a program to deal with. Mostly, the next few chapters deal with text files.

QUESTION 6:

What type of file does the program Notepad create?