Hello World application
Open your IntelliJ IDEA and click on ‘New Project’.
Give your project a reasonable name - i.e.
HelloWorld
.You don’t have to change anything else on this page, just note where the project will be saved - in your home folder in
IdeaProjects
.You can click
Finish
.After a short while the project will appear on the left hand side.
Right-click on the src folder and select
New
->Java Class.
Name itMain
.Your project will be created and opened in your IntelliJ. You should see a file called
Main.java
. It contains a class definition with amain
method. That's where we will place our code.Type in Inside your newly created class, type
psvm
and click enter. It will create amain
method.Inside the main method, type
sout
and Enter. It will generateSystem.out.println("Hello world!");
inside the main method line of code. Within the parenthesis, type"Hello World!"
.Run your application - right-click into the
Main.java
file and selectRun
.After a short while, you should see a similar output at the bottom part of your IntelliJ window.
Congratulations, you created your first Java application
...