© Toby Weston 2018
Toby WestonScala for Java Developershttps://doi.org/10.1007/978-1-4842-3108-1_1

1. The Scala Language

Toby Weston
(1)
London, UK
 
Scala is both a functional programming language and an object-oriented programming language. As a Java programmer, you’ll be comfortable with the object-oriented definition: Scala has classes, objects, inheritance, composition, polymorphism—all the things you’re used to in Java.
In fact, Scala goes somewhat further than Java. There are no “non”-objects. Everything is an object, so there are no primitive types like int and no static methods or fields. Functions are objects and even values are objects.
Scala can be accurately described as a functional programming language because it allows and promotes ...

Get Scala for Java Developers: A Practical Primer now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.