PrintNumber ErrorLocation Error Correction DateAdded
1 pi (Covers Java 7 and Android) delete and add Sixth Edition after 21 Days 5/6/2013
1 pii Sams Teach Yourself Java in 21 Days
(Covering Java 7 and Android)

First Printing August 2012
Sams Teach Yourself Java in 21 Days, Sixth Edition

Second Printing July 2013
6/14/2013
1 pxviii Email: errata@informit.com
Mail: Addison-Wesley/Prentice Hall Publishing
ATTN: Reader Feedback
1330 Avenue of the Americas
35th Floor
New York, New York, 10019
Email: feedback@samspublishing.com
Mail: Sams Publishing
ATTN: Reader Feedback
800 East 96th Street
Indianapolis, IN 46240
USA
6/19/2013
1 p73 Listing 3.3  The Full Text of StringChecker.java
1: class StringChecker {
2:
3: public static void main(String[] arguments) {
4: String str = “ Would you like an apple pie with that?”;
5: System.out.println(“The string is: “ + str);
6: System.out.println(“Length of this string: “
7: + str.length());
8: System.out.println(“The character at position 6: “
9: + str.charAt(6));
10: System.out.println(“The substring from 26 to 32: “
11: + str.substring(26, 32));
12: System.out.println(“The index of the first ‘a’: “
13: + str.indexOf(‘a’));
14: System.out.println(“The index of the beginning of the “
15: + “substring \”IBM\”: “ + str.indexOf(“IBM”));
16: System.out.println(“The string in uppercase: “
17: + str.toUpperCase());
18: }
19: }
Listing 3.3  The Full Text of StringChecker.java
1: class StringChecker {
2:
3: public static void main(String[] arguments) {
4: String str = “Would you like an apple pie with that?”;
5: System.out.println(“The string is: “ + str);
6: System.out.println(“Length of this string: “
7: + str.length());
8: System.out.println(“The character at position 6: “
9: + str.charAt(6));
10: System.out.println(“The substring from 26 to 32: “
11: + str.substring(26, 32));
12: System.out.println(“The index of the first ‘a’: “
13: + str.indexOf(‘a’));
14: System.out.println(“The index of the beginning of the “
15: + “substring \”apple\”: “ + str.indexOf(“apple”));
16: System.out.println(“The string in uppercase: “
17: + str.toUpperCase());
18: }
19: }
6/19/2013
1 p270 The combo box is created in line 5 and is filled with strings from an array in the for loop in lines 14–16. The combo box is created in line 5 and intialized with an array of strings that contains four elements. 6/19/2013
1 p342 public void actionPerformed(ActionEvent event) {
Object source = evt.getSource();
}
public void actionPerformed(ActionEvent event) {
Object source = event.getSource();
}
6/19/2013