Syntax of Java ?

Syntax of Java ?

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

class1.It is a keyword which is used to declare a class.
2.Keyword:The word which is predefined in the library is called keyword.for example class,void ,main etc.
Easy1.It is an userdefined class name.
public1.It is a keyword which is called access specifier/modifier.
2.It is used to provide accessibility of data member(variable) and member funation(function).
static1.It is a keyword.
2.It can be used with a variable or function or block,we will discuss it in next chapter.
void1.It is a keyword.
2.It indicates that there is no value is returning by the function.
3.If we use any other keyword like int,float,char etc in place of void then we will use return keyword.
main()1.It is the function which is called the entry point of any program.
2.The execution of any prgram starts from the main function.
3.If in a program there is only one function then it should be main function.
String[] args1.It is an array of type String.
2.It is also called command line argument.
3.you can write anything in place of args
System.out.println1.It is used to print data or information on to the output screen.
2.System.out means Standard output object.
3.println is a method/function.
Next Post Previous Post
No Comment
Add Comment
comment url