DEV Community

Cover image for Java Programming #1: Getting Started
luthfisauqi17
luthfisauqi17

Posted on • Edited on

Java Programming #1: Getting Started

In this article, I will show you how to getting started in learning java programming language. Before doing anything related to programming, let us consider the environment in which will be use to writing the coding.


1. Text Editor or IDE

In general, people usually use either Text Editor (Visual Studio Code, Atom, etc.) or IDE (Intellij, Eclipse, etc.). But in this tutorial, we will use Intellij IDE for the coding environment. You can use either the Community Edition or the Ultimate Edition, as for a side note, Intellij Ultimate Edition is not free, however, if you have student mail account, you can register that account for a free student license. The following is the logo of the Intellij IDE.

Intellij Logo, taken from https://commons.wikimedia.org/wiki/File:IntelliJ_IDEA_Icon.svg


2. Installation

To perform the installation, you can refer to this page from the official Jetbrain's Intellij IDE here. After installation is completed, you can go create a new project (you can name the project as you like), and create a new class file called Main.java inside the src folder. You can refer to the following screenshot for this step (Let me know if the text is too small or not).

Step.1


3. Your First Program

To confirm that you have installed the IDE successfully, you can type the following code inside the Main.java class that you have made previously.

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello World");
    }
}
Enter fullscreen mode Exit fullscreen mode

After typing the above code, you might notice that there will be a green play button on the leftside beside the line number. Click that green play button, choose run, and you will see an output "Hello World" in the terminal below. You can refer to the following screenshot for this step.

Step.2

If the above output match with your output, CONGRATS.. you are a Java Developer now 😎


I hope that my article helps you to getting started in learning Java programming language. You can give this article some comments, as any feedback is very valuable and important to me (also suggest me some ideas that you think I need to cover). Thank you for reading this article, and have a nice day 😃


References

Top comments (0)