The Artima Developer Community


Errata for Programming in Scala, 2nd Edition
Chapter 31: Combining Scala and Java
Return to errata index.

Page 680 (PDF page 713):
The first paragraph (the one starting with "To contrast ...") seems to be
wrong. It states that if both a class and its companion object are
defined, no static forwarding methods to the companion object would be
defined in the class and that Java code will have to access the companion
object via the MODULE$ instance. I wrote a simple code example and by
using javap I saw that actually those static forwarding methods are
defined. 
I apologize if I actually misunderstood the fragment.
Page 689 (PDF page 722):
You are missing a "do" in second paragraph of 31.5.  "All you have to is
put the Java source files on the command line as if they were Scala
files" should be "All you have to do is ..."
Page 689 (PDF page 741):
"All you have to (do) is put the Java source.."

"do" is missing

[Fixed.]

Page number: Book type: Paperback book PDF eBook
Book version: (Or build date. Found on back of title page.)
Your feedback:
Your name: (optional)
Your email address: (optional) (will not be published)

Copyright © 2024 Artima, Inc. All rights reserved.