Information Updates for Textbook
Update Bulletin
Java 1.5 (tiger) has added new features to make Java programming easier:
generic types, metadata, autoboxing, an enhanced for loop, enumerated types, static import, C style formatted input/output, variable arguments, concurrency utilities, and simpler RMI interface generation. See the resources page
for links to more information.
A cross-browser way to include Java Applets in
html pages using the object tag.
<!-- If not IE, Firefox and others will use outer object -->
<object classid="java:TicSoundApplet.class"
type="application/x-java-applet"
archive="TicApplet.jar,TicSoundApplet.jar"
height="140" width="140" >
<!-- MSIE (Microsoft Internet Explorer) will use inner object -->
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
codebase="http://java.sun.com/update/1.5.0/jinstall-1_5_0-windows-i586.cab"
height="140" width="140" >
<param name="code" value="TicSoundApplet" />
<param name="archive" value="TicApplet.jar,TicSoundApplet.jar" />
<strong>
This browser does not have a Java Plug-in. <br />
<a href="http://java.sun.com/products/plugin/downloads/index.html">
Get the latest Java Plug-in here. </a>
<strong>
</object>
<!-- close inner object -->
</object>
<!--close outer object -->
Java 1.4 has added the java.nio and related packages to
support lower-level I/O including buffers, channels, character encoding,
as well as interruptable and non-blocking I/O.
Sun has released new Java Plug-in
To run Applets with the Sun Java Plug-in
on Microsoft Internet Explorer 6.0 and above,
you need to enable Sun Java Applet via the Internet Options->Advanced
on the Tools menu. You will then also
have a Sun Java Console from the Tools menu.
Java 1.4 new features
Java 1.4 supports regular expressions and
new String methods many related to use of regular expressions with strings.
Textbook Errata
Hopefully there won't be many bugs or misprints.
But, the ones that are found will be listed here.
If you find something wrong or have a suggestion,
either for the text or the website, please
let us know. Your input will be deeply appreciated.
Page 49, first line section title: drop the first word "ASCII" in the section title.
Page 55, Java code is replaced by
public class Tryme
{ public static void main(String[] args)
{ for (int i =0; i <5; i++)
System.out.println(i); // 0 through 4
System.out.println(i); // displays 1.5
}
static double i = 1.5;
}
Just above this code: nested blocks: ---> nested scopes:
Page 63, last line on page:
... and Section 6.8 for an application of StringTokenizer.
Page 90, line (A) in code: change prec = pr++; to
prec = ++pr;
Page 128, last bullet point on the page:
public void finalize() ===> protected void finalize()
page 253, replace code starting at line 4:
public class Click extends JApplet
{
public void init()
{ lb = new JLabel(cl + n, JLabel.CENTER);
lb.addMouseListener // (1)
(new MouseAdapter() // (2)
{ public void mouseClicked(MouseEvent e)
{ n++; lb.setText(cl+n); } // (3)
}
); // (4)
getContentPane().add(lb, BorderLayout.CENTER);
}
private String cl = "CLICK ME: ";
private JLabel lb;
private int n = 0;
}
page 140, assignment 4:
Change "Section 6.4" to "Section 6.8".
Then, move this assignment to Chapter 6 as assignment 13.
page 336, paragraph 4, line 1, change last word:
asArray to asList
page 353, line 1, revised as follows:
{ out.print(msg); out.flush(); out.close();
page 440, line 3 of 12.4: change dir to help dir.
page 476, line 9: (see figure page iv)
page 491, Figure 13.10:
improved figure
page 548, line 4 of the evenOdd code:
return 0; =====> return 2;
last page (inside backcover), USAGE INSTRUCTIONS (PC) has been
updated and revised to include instructions for all versions of Windows.
See this pdf file for the revised version.
|
|