Chapter 1. The Basics

Topics in This Chapter image

1.1 The Scala Interpreter — page 1

1.2 Declaring Values and Variables — page 3

1.3 Commonly Used Types — page 4

1.4 Arithmetic and Operator Overloading — page 5

1.5 Calling Functions and Methods — page 7

1.6 The apply Method — page 8

1.7 Scaladoc — page 8

Exercises — page 11

In this chapter, you will learn how to use Scala as an industrial-strength pocket calculator, working interactively with numbers and arithmetic operations. We introduce a number of important Scala concepts and idioms along the way. You will also learn how to browse the Scaladoc documentation at a beginner’s level. ...

Get Scala for the Impatient 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.