Java Examples in a Nutshell by David Flanagan Here are the changes from the 5/98 reprint: {16} Example 1-13: line 24, changed if (c >= 'Z' ) c -= 26; to if (c > 'Z' ) c -= 26; and line 28, changed if (c >= 'z' ) c -= 26; to if (c > 'z' ) c -= 26; {27} Example 2-6: line 8, changed int seed = 1; to long seed = 1; line 13, changed public Randomizer(int seed) { this.seed = seed; } to public Randomizer(long seed) { this.seed = seed; } and line 36, changed Randomizer r= new Randomizer((int)new java.util.Date().getTime()); to Randomizer r= new Randomizer(new java.util.Date().getTime()); {84} Example 5-1, lines 1-2: changed import java.applet.*; import java.awt.*; to import java.applet.*; import java.awt.*; {118} Example 6-7, line 10: changed b.setBounds(i*26, i*18, 100, 25); // use reshape() in Java 1.1 to b.setBounds(i*26, i*18, 100, 25); // use reshape() in Java 1.0 {328} Example 16-1, lines 27-28: changed status = s.getMoreResults(); } while(status || s.getUpdateCount() != -1); to status = s.getMoreResults(); // With some buggy JDBC drivers, this condition causes an infinite // loop with SQL updates. If that happens, change to: while(status); } while(status || s.getUpdateCount() != -1); (removed blanks lines between lines 10 and 11 and between lines 24 and 25 to preserve the page breaks.) {381} Example 6, line 10 from the bottom: changed // Add some items to the Edit menu to // Add some items to the View menu