Answers to Self-Test Questions
1. If a program sends its output to the screen, the output goes away when (or soon after) the program ends. If your program sends its output to a file, the file will remain after the program has finished running. A program that sends its output to a file has preserved its output for use long after the program ends its execution. The contents of a file remain until a person or program changes the file.
2. From a file to the program.
3. All files contain binary data. Text files can be thought of as a sequence of characters. You can write to and read a text file by using a text editor or your own Java program. All other files are called binary files. Data in these files cannot conveniently be read using a text editor, ...
Get Java: An Introduction to Problem Solving and Programming, 8th Edition 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.