From the course: Scala Essential Training for Data Science
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Scala data types - Scala Tutorial
From the course: Scala Essential Training for Data Science
Scala data types
- [Instructor] Here is a list of basic Scala data types. These are scalar data types which means that they store a single value. We'll discuss arrays, lists, and other non-scalar data types in an upcoming lesson. If you've used other programming languages, this list of data types probably looks familiar. Byte, as the name implies, is used to store an 8-bit value. Short, int, long, float, and double are numeric data types. Char is used to store a single character. Let's take a look at how to work with these data types in Scala. If you followed along with the previous lesson on installing the Scala IDE, you will have installed a Scala command line tool known as a REPL, which is short for Read Eval Print Loop. Let's switch to the terminal window. I'll enter the Scala command to start the REPL. Then I'll print a welcome message and display the Scala prompt. First thing I want to do is to find a variable. Now we define variables with the var keyword followed by a variable name. In this…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
The advantages of Scala for data science1m 34s
-
(Locked)
Installing Scala2m 56s
-
(Locked)
Scala data types4m 34s
-
(Locked)
Scala collections1m 17s
-
(Locked)
Scala sets Scala arrays, vectors, and ranges5m 37s
-
(Locked)
Scala maps4m 28s
-
(Locked)
Scala expressions3m 40s
-
(Locked)
Scala functions2m 46s
-
(Locked)
Scala objects8m 5s
-
-
-
-
-
-