Errata

Learning Java

Errata for Learning Java, Sixth Edition

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Page Enter Generics
2nd Paragraph

'If you look at the source or Javadoc for the List class,'
should be changed to:
'If you look at the source or Javadoc for the List interface,'

Similarly, in the code snippet below the paragraph:
public class List<E> {
should be changed to:
public interface List<E> {

Note from the Author or Editor:
Suggested change is correct; I'll fix this in the 7e.

Tirumala Rao Bokka  Apr 08, 2026 
Page Enter Generics
8th Paragraph

As before, ArrayList is a class that implements the List interface, but in this case, both List and ArrayList are generic classes.
should be changed to:
As before, ArrayList is a class that implements the List interface, but in this case, both List and ArrayList are generic types.

// calling them generic types is more appropriate than calling them generic classes

Note from the Author or Editor:
Suggested fixes are correct; I'll include this fix in the 7e

Tirumala Rao Bokka  Apr 08, 2026 
Page Enter Generics
2nd code snippet from the end of the section (in reverse)

public class Map<K, V> {
should be changed to:
public interface Map<K, V> {

Note from the Author or Editor:
Good catch! And timely; we're starting work on the next edition and will be sure to fix this mistake.

Tirumala Rao Bokka  Apr 08, 2026 
Page Erasure section of Chapter 7
7th paragraph

This time the compiler simply puts its foot down and says, “No.” You can’t test for a generic type in an instanceof operation.

// This is true in Java 11 and earlier. However, in Java 17 and later you can test for a generic type in an instanceof operation.

Note from the Author or Editor:
Confirmed. I will update this section in the 7e.

Tirumala Rao Bokka  Apr 09, 2026