Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Hello World application

  1. Open your IntelliJ IDEA and click on ‘New Project’.

  2. Make sure Java is selected on the left hand side and Java 11 as Project SDK. Click Next.

    Image Added
  3. You can select the tick-box presented on the next page - the project will be created to accommodate for command line application style code and click Next.

    Image Added
  4. On the next page, type in the name of your project - HelloWorld, you can accept the default location where the project will be created, just make a note of it. And in the last text box type in com.virtual1. Click Finish.

  5. Your project will be created and opened in your IntelliJ. You should see a file called Main.java. It contains a class definition with a main method. That's where we will place our code.

    Image Added
  6. Type in System.out.println("Hello world!"); inside the main method.

    Image Added

  7. Run your application - right-click into the Main.java file and select Run.

    Image Added

  8. After a short while, you should see a similar output at the bottom part of your IntelliJ window.

    Image Added

  9. Congratulations, you created your first Java application!