[MUSIC] [MUSIC] Hello everyone and welcome in this video presentation of the IntelliJ interface, the programming environment you will use for this you will use for this course. We'll start by running the program and create a new project. You need to select Scala on your left, here, and then your left, here, and then, select IDEA, here. Once these two points have been points are selected, you click on Next. You give a name to your project, here we'll call it hello. We check that the JDK is selected, here we have version 16 of temurin, and also that the version of the Scala SDK 2.13 is selected. If you do not have this configuration available, please review the previous videos. Then you click on Finish. Once launched, the interface opens. On your left, you have a tree that represents representing the folders, the files, that are part of the project, and on your right, you have, here, the code editor, which corresponds, in fact, a text editor. We are going to create a Scala file. First we click on src, src means source. Then you right click, New, new, and Scala Class. You select Object. You give a name to your class, we'll call it Hello. Object, here you go. Once you have selected Object and you have given it a name, you click on Enter, and the code editor appears. So here it's like Notepad or Word, you can type text. We're going to start, now, by defining the method of your program, that will always be executed first, the main method. To do this, just start typing main, and automatically IntelliJ will propose you to use a template, Template for main method, that is that it has understood what you were doing and and it offers to help you. So by typing main, it shows us this little interface here. We click on Enter, and automatically, it will write us the signature of the main method. We will see what is the signature of a method in one of the last modules of this course. What you need to know is that this is the first method, this is the entry point of your program, that is, everything not defined inside, between these two braces, will not be executed when your program is your program is launched. We will start by checking that we can run a program. A simple way to do this is to to write a simple message that will be displayed in the IntelliJ console. Where is the console? It will appear here, at the bottom of the screen, when you run your program. So let's start by writing a piece of code that will allow display a message in the console. For this, we have to use the println method. You see, automatically, it offers us different methods, This is called autocompletion. Here it proposes print or println. The difference between the two, is that println, at each call of this method, at the end it will skip a line, unlike print where there will be no there will be no line break. Generally, we use println much more often. We will now write a little message: Hello. That's it. So there, when we run our code, IntelliJ will display Hello in the console. Now let's try to do it by executing the code. How do we run the code? It's easy: you go to the left side of the of the interface, in src, you have the file Bonjour.scala that you created earlier, that's there; here, you right-click, and you click and click Run 'Bonjour'. Once this is done, the program will be compiled, and then it will be executed. Now the program has been executed and you can see that the you can see that the message has been displayed. Now we can try another method test another method: we will check that our program is able to read what we to read what we enter on the keyboard. For this, we need to import a method, which is part of a library. So a library, you can think of it as code that's already been written by other people, that you can reuse. Here we are, call the readLine method, which is in the package [NOISE]. [NOISE] [NOISE] scala.io.StdIn.readLine. You see, every time it offers me. So there, the line is grayed out, it's because IntelliJ warns you that you haven't used it yet. So now, we will ask the user to your program, we are going to ask him for his ask for his name, and for that, we need to create a variable name, val.name, the equality for the assignment readLine. So we're going to, now, add the content of the variable name at the end of our print, here. To do this, we use the concatenation operator for string type, which is the +, and finally the variable. Now I'm going to rerun my program. You can always go through Bonjour, right click, Run, but once you've done that, you can now go directly through this little green arrow here. The program is being compiled. It is launched, you see here, the Scala console is waiting for my keyboard input. I enter my name. Once I have entered my name, I press Enter, and the program displays the message Hello Alex, which we programmed earlier. The Alex, of course, which comes from the input keyboard entry that I typed myself. I hope this video has helped you understand a the IntelliJ interface a bit more. This is a very complex interface, with many different buttons, submenus. We will only use a small part of it during this only a small part of it during this course. Thank you for your attention. [MUSIC] [MUSIC]