Martin Odersky’s primary influence when developing Scala was the Java programming language, so much so that Scala is actually written to run in Java Virtual Machine. Scala programs compile to JVM bytecodes, and their runtime performance is mostly on par with Java programs. If you are not familiar with bytecode, that’s perfectly fine. All you need to know is that Java programs don’t compile into executable files; instead, they compile into bytecodes which are then executed during runtime.
Scala allows you to call Java methods, access Java fields, inherit from Java classes, and implement Java interfaces in your code without the added requirement of any special syntax. Programmers are not even aware of how heavily Scala code makes use of Java libraries.
Scala also reuses Java types. Scala’s Int is represented as Java’s int, Scala’s Float is represented as Java’s float, and so on. Scala’s string literals are of type java.lang.String and Java’s string methods can be called on them.
While the parallels between Java and Scala are evident, Scala differs in many ways as well with its code being much more concise, clean, and with its own benefits.