Java Reference
In-Depth Information
The name of the class is not included in the strings passed to
main
. You
already know the name because it is the name of the class in which
main
is declared.
An application can have any number of
main
methods because each class
in the application can have one. Which class's
main
method is used is
specified each time the program is run, as
Echo
was.
Exercise 2.18
: Change
Vehicle.main
to create cars with owners whose
names are specified on the command line, and then print them.