Chapter 1. The Basics

Topics in This Chapter A1

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.

Highlights of this introduction are:

  • Using the Scala interpreter

  • Defining variables with var and val

  • Numeric types

  • Using operators and functions

  • Navigating Scaladoc

1.1 The Scala Interpreter ...

Get Scala for the Impatient, 3rd Edition 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.