Monday, 26 August 2013

First Program of JAVA

Today we will learn first program of JAVA.

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

First line : "class" is a keyword that function is to declare class,"HelloWorld" is the Class name .

2nd Line : It is the starting point of program . public ,static ,void and String are the keyword ;eachone have their own functionality.
public is declare something to public-ally  accessible.It actually a access modifier.Access Modifier is also apart topic.
"static" mean declare something all for equally,for example if any one want to share the today Date then all have same value.
"void" mean nothing or  it return nothing .When Function portion of programming will discuss then you get good idea about this word 'void' also about the Function topic.
"(String []args)" it is a simple parameter to get value at compile time.

"{  }" : this is the boundary of   class HelloWorld.

3rd Line: System.out.println("HelloWorld"); : It just simple give the output of HelloWorld at the console at the runtime.If you want to write something at console then type between " ".

The all discussion we have discussed include in all programming portion.So therefore it is very important for beginner to understand thoroughly .Now we include this in all .
If you have any query related this ,then comment me below. :)

No comments:

Post a Comment