Developing a Java program – Hello World

Published on July 2, 2015 by abundantcode

Filed under Java

Last modified July 2, 2015

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 4600 times

There are lot of IDE options for the developers to create a java application . In this article , we will use Jet brains IntelliJ IDEA Community edition of the IDE to develop the Java console application.

Developing Java program in IntelliJ IDEA

1. Download and install Jet brains IntelliJ IDEA Community edition . Make sure you have the Java (JDK) installed on your PC as well.

https://www.jetbrains.com/idea/download/

2. Launch Jet brains IntelliJ IDEA and click File –> New –> Project.

image

3. In the New project dialog , select Java from the left sidebar and then select the project SDK and click Next.

image

4. Select the check box “select project from template” and select “Command Line App” and click Next.

image

5. Provide the Project Name , Project Location ad the Base package name and click Finish .

image

6. This would create the project in the IDE . Open the Main class file which can be found in the folder src –> <Name of the project> .

image

Lets start our Hello Java World code. Replace the Main.java file with the below code snippet . (Note : Check the package name if you have provided a different name when creating the project).

package com.abundantcode;

public class Main {

    public static void main(String[] args) {
        System.out.println("Welcome to Abundantcode's Java Program");
    }
}

Let’s run the application . Press Ctrl +F5 to run the application. You will see the below output.

image

Leave a Comment


x

You might be Interested in these Posts

C# Program to swap two numbers without using temporary variable

Problem Write a program in Visual CSharp to swap two numbers using temporary variable and display t...

C# Program to swap two numbers

Problem Write a program in C# to swap two numbers using temporary variable and display the result i...

C# Program to print the sum of two numbers

Problem Write a program in C# to add two numbers and display the result in copnsole window. How to...