My First Java Code

My First Java Code

April 10, 2020
Oracle DBA
oracle dba oracle database management database management system database oracle performance tuning oracle sql learn sql learn personal injury attorney new york mesothelioma lawyers mesothelioma lawyers new york mesothelioma lawyer the stock market plumbing retirement planning barclays stock broker financial advisor personal retirement financial advisor

The previous Java chapter is about how to install Java software and from where can you download it. Also we had a quick look at the Java developer tool Eclipse.

This page is about the Java code and you will have a change to write your first code and see the output. To be able to write your code in Eclipse you would need to create a project. Open from the File menu -> New -> Project. The following window will open and from there click on “Java Project” option. We do recommend to create in our tutorial a new project every time so the previous samples wouldn’t have an affect to the new ones.

java training java curso java in java latest java latest how to design a website html web page make web page financial advisor personal personal injury attorney new york mesothelioma lawyers mesothelioma lawyers new york mesothelioma lawyer the stock market plumbing retirement planning barclays stock broker financial advisor personal retirement financial advisor

Give to your project a name and for example in this tutorial to make sure you wouldn’t mix up something existing set the name “mylook365 Day1” and click “Finish“.

java training java curso java in java latest java latest how to design a website html web page make web page financial advisor personal personal injury attorney new york mesothelioma lawyers mesothelioma lawyers new york mesothelioma lawyer the stock market plumbing retirement planning barclays stock broker financial advisor personal retirement financial advisor

You do have a project folder and we are missing only a file to store the code. From menu “File” -> “New” -> “Class” and set the name “HelloWorld” and “Finish“. This class name is mandatory to leave as is or your code wouldn’t work. The new class window will open with default class script. Replace the code with the following one and hit the “Run” button.

class HelloWorld {
	public static void main(String argv[]){
	System.out.println("Hello World!");	
		} 
}

The console window has text “Hello World!” and that means you just executed your first Java code.

java training java curso java in java latest java latest how to design a website html web page make web page financial advisor personal personal injury attorney new york mesothelioma lawyers mesothelioma lawyers new york mesothelioma lawyer the stock market plumbing retirement planning barclays stock broker financial advisor personal retirement financial advisor

Now you are ready to move to the next page and we’ll have a look what does the code mean and what is inside it.

P.S. When you did face a compiling errors then check the Java software you did install. The version should be for developers like “SDK” and the second thing would be to give Eclipse a correct Java version path.

See Also:
Previous: Introduction Next: The HelloWorld code Java Home

Leave a Reply

Your email address will not be published. Required fields are marked *

*