An Introduction to Operators

In the following lesson, you will be given an overview of the operators Scala provides.

We'll cover the following

Operators are symbols that perform operations used for modifying or manipulating data. Manipulating data is an essential part of any programming language, and Scala is no different, providing a rich set of operators for its basic types.

Types of Operators

As far as built-in operators go, Scala provides the following five types.

  • Arithmetic Operators
  • Relational Operators
  • Logical Operators
  • Bitwise Operators
  • Assignment Operators

In the coming lessons, we will be discussing each type of operator individually.

Operators Are Methods

In the previous lesson, you were introduced to methods. Operators are simply methods called using the operator notation we discussed in the previous lesson.

Operators usually follow an infix notation. The infix notation is where the operator is situated between two operands. Operands are the data objects that the operator is performing an operation on.

Create a free account to access the full course.

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