---
tags: Setup-Summer21
---
# Lecture 20 Setup/Prep
Welcome to Scala, a programming language that aims to combine the best of Java with the best of functional programming. It was developed by a programming languages researcher with a lot of experience in both functional and object-oriented programming who was frustrated that he couldn't use his favorite features of both at the same time.
The next couple of lectures will introduce you to Scala through a couple of programs that exercise its functional and object-oriented features. This first Scala lecture will emphasize at the functional features.
## Prep
If you just want to take notes on paper, there is nothing to prepare.
If you want to follow along in IntelliJ, you need to set up and test your ability to run Scala programs. Here are the steps:
- Make a new project in IntelliJ for your Scala work. If you already installed the Scala package back when you installed IntelliJ, you should see an option for Scala (three red bars) towards the bottom of the left panel of the New Project window. Select that, which will bring up a window where you will make some settings (for sbt version and Ivy -- see the [IntelliJ setup guide](https://hackmd.io/@cs18-spring-2021/rkqhvPyy_) if you need details or did not already set up Scala).
- Remember to add the tester library to the Scala project (the same way you did for Java; see the setup guide for instructions)
- To set up a new package for a specific lecture: in the Project panel (top left), click down to open up *ProjectName -> src -> main -> scala*. Right-click on scala to get the "new" menu that includes the "package" option (as you have used in Java). Make a package for the lecture.
- To make a new Scala file in the package: right click on the package name, select "new", and choose "File". Include `.scala` at the end of the file name. Create a new file called `Hello.scala`.
Now, put the following code into `Hello.scala`:
```
package lec20
object Main extends App{
System.out.println("Hello, Blueno");
}
```
At this point, you should see a green `Run` arrow next to the `Main` object. If you can run that and see `"Hello, Blueno"` print in the console, you're all set!
The following screenshot shows what you should see (except the package will be lec20):
