Variables in Scala

In the following lesson, you will be introduced to variables and how they are declared in Scala.

Introduction

Imagine you have multiple boxes and in each box, you can store one item. Before you can store anything, you need to decide what type of item can be stored in each box. But now you have so many boxes, you don’t remember what is in each one. You decide to give each box a unique label. This will help you keep track of what each one contains. The labels act as identifiers, giving each box a unique identity.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy