
On the bottom of the copyright page (facing the first page of the table of
contents), look for a line such as
First printing, March 2012
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.
else -1.” to
“Then it gets confused about the else keyword.”for (elem <- a if a % 2 == 0) yield 2 * elem
to
for (elem <- a if elem % 2 == 0) yield 2 * elem
var first
= false to var first = trueval bSorted = b.sorted(_ < _) // b is unchanged; bSorted is ArrayBuffer(1, 2, 7, 9)
to
val bSorted = b.sorted // b is unchanged; bSorted is ArrayBuffer(1, 2, 7, 9)
Change “You pass the comparison function as a parameter—see Chapter 12 for the function syntax.” to
You can also supply a comparison function, but then you use
the sortWith method:
val bDescending = b.sortWith(_ > _) // ArrayBuffer(9, 7, 2, 1)
See Chapter 12 for the function syntax.
The cross-reference has extra text in the section title. It should be Section 5.1, “Simple Classes and Parameterless Methods”
The cross-reference has extra text in the section title. It should be Section 6.3, “Objects Extending a Class or Trait”
final
field is immutable, similar to val in Scala.max to maxLengthIterable to Seqhead: B to head: E
Change unapply(result) to unapply(lst)
alls? thr to [Ff]alls? thrProduct to Articlesqrt(Double) to sqrt(x)Comparable[Student] to
Comparator[Student]Comparable to Comparator (2x)XML.save(writer, root, "UTF-8", false, null) to
XML.write(writer, root, "UTF-8", false, null)It requires that there is an “implicit value” of type T[M].
to
It requires that there is an “implicit value” of type M[T].
T <: Upper >: Lower
to
T >: Lower <: Upper
foldLeft[B](z: B)(op: (A, B) => B): B to
foldLeft[B](z: B)(op: (B, A) => B): B// You can write the second parameter as find:
Person => Person
to
// You can write the second parameter as find:
Student => Person
v” to “Given any reference
v”Object instance as
parameter” to ““a method that takes an object instance
as parameter”target”abstract trait to trait (2x)trait ActionListener {
to
trait ActionListener extends Listener {
object ButtonModule extends ListenerSupport
{
to
object ButtonModule extends ListenerSupport {
class Buffer[E] extends Iterable[E]
to
class Buffer[E] extends Iterable[E] {
* or /” to
“because there is no *” val c = new Channel to val channel = new
Channel (2x). Change case !(c, x) => to
case !(channel, x) => ?! operator” to “by using the
!? operator”react never
returns a value” to “ “The partial function associated with the
first react never returns a value””javax.imageio.IOImage.read to
javax.imageio.ImageIO.read5! is 120. You will
need an enrichment class and an implicit conversion.” textField.setEnabled(false)
Thanks to Stephyn Butcher, Rob Dickens, Stephen Eldridge, Ersin Er, Dominik Gruntz, Matt Hurne, Jessica Kerr, William King, Alina Kirsanova, Vladimir Nikolaev, Daniel Sobral, Philip Watson, 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!