December 1999
Intermediate to advanced
816 pages
20h 27m
English
There are three kinds of Java programs: applications, Applets, and Servlets. Servlets are outside the scope of this book. Applets will be considered in Chapter 9, "GUI Programming II: Applets." Here, I will focus only on applications. Every Java application—but not class—must have a method that looks like the one in listing 3.3.
public class LibraryCard
{
String borrowerName;
float fines;
public static void main(String[] args)
{
System.exit(0); // The proper (but optional) method
// to exit a Java application
}
}
|
The only required method is main. It has several important parts to its signature:
public—This part of its signature grants access to this method from anywhere. ...
Read now
Unlock full access