Are scala and java interchangeable?

Scala is similar to Java in the sense that it compiles to Java bytecode and runs on the JVM. In fact, Scala is interoperable with Java. This means that you can use Java and Scala interchangeably and that Scala is compatible with Java code. Since Scala was designed to address the shortcomings of Java, you should not be surprised to learn that Scala runs on Java Virtual Machines (JVM).

Congratulations, you now have to artificially limit what language features you will use and what you won't, which is exactly what the babbling idiots who are using Clojure for Scala used as their reason for avoiding Scala to begin with. I've been programming scala for over a year now, so I'll try to go back a year to answer this question. Companies like Google (for Android, Twitter, LinkedIn, Sony, Quora and Foursquare use Scala regularly in their software. I somewhat agree with you that Java 8 will bring more parity with Scala and I could have compared Scala with Java 8, but you agree with me that almost 80 percent of the projects are still on Java 1.6 and below.

If you were programming Scala without prior knowledge of Java this problem would probably be very difficult to solve. Started by Swiss computer scientist and programmer Martin Odersky, Scala is a general-purpose programming language with strong static typing. Your path to learning Scala depends largely on your familiarity with other programming languages, such as Java, C or Haskell. Other companies such as Apple, The Guardian, Meetup, Verizon, SoundCloud, Airbnb and Duolingo use Scala on certain hardware or have made statements that they will switch to Scala.

Although Java and Scala are interchangeable, be very careful with identically named Java and Scala classes. Scala and Java are almost perfectly interoperable and the Spark Dataset API is shared between Java and Scala.