On the bottom of the copyright page (facing the first page of the table of contents), look for a line such as
First printing, January 2014
In the errata below, we indicate the printing in which the error has been fixed inside square brackets such as [4].
For example, suppose you have the fourth printing. Then you can ignore all reports that are prefixed with [2], [3] or [4]. But you would want to pay attention to all reports that are prefixed with [5] or higher or that have no bracketed prefix at all.
this
reference of an enclosing
class” to “you can invoke a method of an enclosing class or its superclass”public class Application()
to public class Application
Comparator.comparing(Person::name)
to Comparator.comparing(Person::getName)
Comparator.compare(String::length)
to Comparator.comparing(String::length)
compare
method turns a
function (the key extractor)” to “The comparing
method turns a
function (the key extractor)”uncheck
function” to “the uncheck
method”paralleStream
to parallelStream
ifPresent
method” to “Besides the isPresent
method, there is an ifPresent
method”Optional<T>
,has not T
” to “has type Optional<T>
, not T
”Optional<U> =
to Optional<U> result =
Double result
to Optional<Double> result
(2x)Integer sum = values.reduce(0, (x, y) -> x + y)
List<Locale>> englishLocales
should be List<Locale> englishLocales
.Map<String, City> stateToLargestCity
to Map<String, Optional<City>> stateToLargestCity
Stream::reduce
, where the method without an identity parameter yields an Optional
result.)” to “In the first form, the reduction yields Optional
results, even though the groups can never be empty.”Integer.range
to IntStream.range
public interface Predicate
to public interface Predicate<T>
System.currentTimeMillis
to System.nanoTime
Collector
that fills a given array list of sufficient capacity?”chain
to andThen
(2x). In the entry for BinaryOperator<T>
, add maxBy
, minBy
to the “Other Methods” column.BiFunction<Color, T>
to BiFunction<Color, T, Color>
UnaryOperator
to UnaryOperator<Color>
reader.get(width - x, y)
to reader.getColor(width- 1 - x, y)
and reader.get(x, y).grayscale()
to reader.getColor(x, y).grayscale()
UnaryOperation<Color>
to UnaryOperator<Color>.
ChangeListener
callback tells you the old and new value, which means it has to compute the new value. The InvalidationListener
doesn’t compute the new value, but that means you might get a callback when the value hasn’t actually changed.” to “The ChangeListener
callback tells you the old and new value, which means its caller has to compute the new value. The code that notifies an InvalidationListener
doesn’t compute the new value, but that means you might get a callback when the value hasn’t actually changed.”HBox
that spans two rows.” to “The buttons are in an HBox
that spans two columns.”0.8 * em
to 0.8 * rem
GridPane
line up with the first.t >= 100
to t.doubleValue() >= 100
toNanos
, toMillis
, toSeconds
, toMinutes
” to “by calling toNanos
, toMillis
, getSeconds
, toMinutes
”plusNanos , plusMillis , plusSeconds ,minusNanos , minusMillis , minusSeconds |
Adds or subtracts a number of the given time units to this
Instant or Duration . |
plusMinutes , plusHours , plusDays , minusMinutes , minusHours , minusDays |
Adds or subtracts a number of the given time units to this Duration . |
lastDayOfPreviousMonth(),
ZoneId.getAvailableIds()
to ZoneId.getAvailableZoneIds()
ZonedDateTime
”ZoneId.getAvailableIds()
to ZoneId.getAvailableZoneIds()
putIfAbsent
returns the mapped value (either the existing one or the newly put one), you can combine the two statements:
map.putIfAbsent(word, new LongAdder()).increment();
”. (Actually putIfAbsent
always returns the old value, which is null
when it was absent.)Keys
to searchKeys
/reduceKeys
/forEachKey
, operationValues
to searchValues
/reduceValues
/forEachValue
, operation to search
/reduce
/forEach
, operationEntries
to searchEntries
/reduceEntries
/forEachEntry
.BiFunction
to Function
in the entries for searchKeys
, searchValues
, and searchEntries
(but leave it as BiFunction
for search
).values.parallelSort(values.length / 2, values.length);
to Arrays.parallelSort(values, values.length / 2, values.length);
public void Future<String> readPage(URL url)
to public Future<String> readPage(URL url)
CompleteableFuture
to CompletableFuture
CompletableFuture<List<String>>
to CompletableFuture<List<URL>>
'Hello'.slice(-2.99)
is
the same as 'Hello'.slice(-2)
.” to “For example, 'Hello'.charAt(2.99)
is
the same as 'Hello'.charAt(2)
.”NavigableSet
and NavigableMap
classes” to “NavigableSet
and NavigableMap
interfaces”, and “Now
the Collections class supports these classes” to “Now
the Collections class supports these interfaces”.@PrimaryKeyJoinColumn(name="ID")
Object::isNull
to Objects::isNull
and Object::nonNull
to Objects::nonNull
List<? extends @ReadOnly> Person
to List<? extends @ReadOnly Person>
Statement
and ResultSet
” to “for ResultSet
, PreparedStatement
, and CallableStatement
”. Change “the corresponding setObject
” to “the corresponding updateObject
/setObject
”.path.exists()
method checks whether...” to “The call Files.exists(path)
checks whether...”Files.exists(path)
method checks...” to “The call Files.exists(path)
checks...” [This wasn't done quite right in the second printing.]Arrays.hash
” to “simply calls Arrays.hashCode
”Object.toString
by Objects.toString
Integer.compareTo
to Integer.compare
Thanks to Tommy Becker, Peter Bonney, Jeanne Boyarsky, Joel Caplin, Chee Cheng, Jim Cohoon, Alexandru Cojocaru, Raghavendra Desoju, Jingjing Duan, Markus Falkhausen, Richard Grin, Philip Hodges, Simon Hogg, Michael Inden, Piotr Jaczewski, Raffi Khatchadourian, George Latkiewicz, Songxun Lin, Herouth Maoz, Ari Meyer, Stevens R. Miller, Derek Mortimer, Kohei Nozaki, Ronald Plöger, Mike Rainville, Edward Roques, Yoshiki Shibata, Gene Small, Mikhail Sokolov, Fabian Spinnenhirn, Daisuke Suko, Thalita Vergilio, and (your name might go here) for their bug reports and suggestions!
Please use this form to report any bugs that you find. Please check the list of known bugs first before you report a bug. Unfortunately, I do not have the time to respond personally to every report, but I do read them all and will post updates to this page. Thank you!