Quantcast
Channel: Coffeewithcode.com
Viewing all articles
Browse latest Browse all 40

Eclipse | Hello World Java Project

$
0
0

This article is abut how to start with eclipse hello world java project.

Prerequisite: Java must be installed.

In eclipse click on File -> New Project -> Java Project (as below)

1

It will open new java project wizard. (as below)

Enter a valid a project name in project name text box. Click next (or one can directly click on finish also)

2

Click on finish on next wizard page. (as below)

3

Now create a new java class in src package. 

4

On click of class will open a page for new class entry. Enter valid class name in name text box.

Also check main method check box as below. It will create a main method in class itself.

5

Now a add sys out statement in main method. (as below)

  1. public class Main {
  2. public static void main(String[] args) {
  3. System.out.println("Hello World !!!");
  4. }
  5. }

Noe one can run this as java application. (as below)

6

It will first compile and then run TestProject application.

On console it will print result. ‘Hello World !!!’


Viewing all articles
Browse latest Browse all 40

Trending Articles