Friday, January 22, 2021

Hello world program in java-AapKiApniSchool

In this blog i will explain you. How to write Hello World Program in java? I will explain you in details the flow of Hello World Program in Java? I will explain you each keyword use for this program.


How do you code in Java? | How do you write Hello World in Java? | What is a Hello World program in Java?|what is the command used to retrieve the java files along with the hello world in it?


How to create Java Project?

Open ECLIPSE-> Go To File-> Click on 'New'->Select 'Java Project' (If Java Project is not showing then click on Others and search Java Project)-> Provide Project Name ->Click on Finish.


OpenFileForJavaProject


CreateJavaProject


ProjectNameGiven


How to create Class?

Go to the project which is created now->Src->Right Click on Src->Click on New ->Click on Class->Give Class Name -> Select Public Static Check Box->Click On Finish.



CreateClass


ClassName


How do you code in Java? | How do you write Hello World in Java? | What is a Hello World program in Java?

public class HelloWorldTest {

public static void main(String[] args) {

System.out.println("Hello World");

}

}


Explanation Of Java Code:

public-> It is a modifier those scope is everywhere. In same package,different package etc.
static-> static is keyword in Java. When we using static keyword then without any object we can access that method or variable.
main-> This is the main method of Java from where java program run.
System.out.println-> It is a method in Java which is used to print message on console.    



2 comments:

Featured Post

Interface in java-AapKiApniSchool

Interface in java:  interface is a blueprint of class in java that is used to define contracts. It can contain static constant and abstract ...

Popular Posts