Chapter 10. Integrating Scala with Java
- The benefits of using interfaces for Scala-Java interaction
- The dangers of automatic implicit conversions of Java types
- The complications of Java serialization in Scala
- How to effectively use annotations in Scala for Java libraries
One of the biggest advantages of the Scala language is its ability to seamlessly interact with existing Java libraries and applications. Although this interaction isn’t completely seamless, Scala offers the tightest integration to Java of any JVM language.
The key to knowing how to integrate Scala and Java lies in the Java Virtual Machine specification and how each language encodes onto that specification. Scala does its best to translate simple language ...