Читать книгу Programming Kotlin Applications - Бретт Мак-Лахлин, Brett McLaughlin - Страница 25

Compile and Run Your Kotlin Program

Оглавление

All that's left now is to compile and run the program yourself. This is easy, because IntelliJ gives you a convenient little green arrow to click when you have a Kotlin file with a main() function defined. Just hover over the arrow and click (see Figure 1.7). You can then select Run and your filename (I named mine “UselessPerson”). Your program will be compiled and run, with the output shown in a new pane at the bottom of the IDE (see Figure 1.8).

FIGURE 1.7 You can click the green Run button and select the first option to build and run your code.


FIGURE 1.8 The empty output of your program (which will soon be non-empty) displays in its own window.

In this case, you shouldn't get any errors, but there's not any output either. We'll fix that shortly.

Programming Kotlin Applications

Подняться наверх