Java Reference
In-Depth Information
public static void main(String[] args)
{
int i;
FetchURL f;
for (i = 0; i < args.length; i++)
{
System.out.println(args[i] + ":");
System.out.println(new FetchURL(args[i]));
}
}
}
3.9
W
HAT
Y
OU
S
TILL
D
ON
'
T
K
NOW
We have deliberately avoided file I/O. For Java, it is a multilayered and complex
topic—and with version 1.4 of Java, there is a whole new set of additional
classes (
java.nio.*
) to consider. We refer you instead to Chapter 11 of Eckel's
Thinking in Java
.
There are also a few Java keywords that we have not yet discussed, notably
synchronize
.
Even if you know all the Java syntax, it may still take a while to get familiar
with the way that syntax is typically put to use. Experience and reading other
people's Java code will be your best teachers—but don't assume that a particular
approach is good just because someone else uses it; much new code has been
written in the last several years as people have learned Java. Be sure it's a style
worth imitating, and if you find a better way to do it, use it.
3.10
R
ESOURCES
• Bruce Eckel,
Thinking in Java
.
• Cay S. Horstmann and Gary Cornell,
Core Java 2: Volume 1 Fundamentals
,
especially Chapter 3.
• John Lewis and William Loftus,
Java Software Solutions
.
• The Sun Microsystems Java Tutorial.
17
17.
http://java.sun.com/docs/books/tutorial/index.html