Two. One per class, including the class whose job is merely to hold the static main method.
If Car.java contains the definition of the Car
class
and MilesPerGallon.java contains the above program and both are in the same disk directory,
then the program could be compiled and run by doing:
You don't need to do the DIR commands, of course, but it is useful to see what is going on.
Is the class MilesPerGallon
used to create an object?