Classes in Scala are broadly divided into two categories; built-in classes and user-defined classes. The focus of this chapter will be built-in classes, i.e., classes provided by Scala.
Do you remember when we discussed strings? All the methods we discussed were actually a part of Scala’s built-in String class. This is how strings differ from other data types. When we define a string, we are actually creating an instance/object of the String class. Methods such as length and toUpperCase are all members of the String class which can be used by an object of that class.
In the upcoming lessons, we will be looking at Scala’s collection library, which is made up of multiple classes.
In the next lesson, you will be introduced to the Scala collection library.