JVM languages
As you probably know, the Java platform is not only the Java programming language, but also the Java Virtual Machine (JVM) can run code from other JVM languages. There are a number of languages that run on JVM and have REPL, for example, JavaScript, Scala, Groovy, JRuby, and Jython. There are many more. All these languages can access any code written in Java and they have interactive consoles.
For example, Groovy is very similar to Java, and prior to Java 8 almost any code written in Java could be run in Groovy. However, for Java 8, this is no longer the case. Groovy does not support the new Java syntax for lambda expressions and functional interfaces, so we will not be able to run most of the code from this book there.
Scala ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access