PROGRAMMING FUNDAMENTALS › JAVA FUNDAMENTALS
Java is a programming language. Its rules give meaning to the source written in Greeting.java, just as the rules of a spoken language give meaning to a sentence. The file is written using Java, but the file itself is not Java. Java is the set of rules that tells the compiler how to understand what that file says the program should do.
The intended behavior is simple: after Greeting.java has been processed and its program is run, the displayed line is exactly "Hello, Mira". That line is not the Java language either. It is the result produced by a program whose source was written in Java.
Which description correctly identifies Java, Greeting.java, and "Hello, Mira"?
Checkpoints are not graded. They are here so you catch yourself before the quiz does — stuck, ask the tutor on the right.
Greeting.java is a passive file. It can sit on your computer without displaying anything, because a file containing source code does not perform its described behavior merely by existing. The source must first pass through Java software that can process what the file contains.
Only after that processing can the described program run and produce the line "Hello, Mira". The path is therefore not a direct jump from a file to a displayed result. Greeting.java provides the instructions, processing turns those instructions into something that can run, and the running program produces the result.
This difference explains why opening Greeting.java is not the same as running it. Opening the file lets you inspect source code. Running the program causes the behavior described by that source to take place. Until the source has been processed and the program is running, the file remains passive and no greeting has been produced.
In a precise sentence, Java means the programming language used to write Greeting.java. In a broader sentence, Java can mean the surrounding software system that processes Java source and allows the resulting program to run. These two uses are connected, but they do not identify the same thing.
For example, the phrase "Java processes Greeting.java" usually uses Java broadly. A language by itself is a collection of rules, while software performs the actual processing. The sentence is describing the software system acting on the file, not claiming that the abstract language is a physical tool that opens and changes the file.
Given the phrase "Java processes Greeting.java", type the broad referent intended by Java.
Checkpoints are not graded. They are here so you catch yourself before the quiz does — stuck, ask the tutor on the right.
When someone says Java in connection with Greeting.java, ask what kind of thing the sentence needs. The language is the set of rules used to write and understand the source. Greeting.java is the source file that holds those instructions. Supporting software processes the file. The running greeting program performs the described behavior, and its result is the displayed line "Hello, Mira".
These parts depend on one another, but they are not interchangeable. You can have the language without pointing to this particular file, the file before anything is running, the supporting software without confusing it with the source, and the result without calling that result Java. Precise language keeps the path from Greeting.java to "Hello, Mira" clear.