To begin this blog with, I will Share Simple Java Hello World Program. /** * * @author Eric */ public class Hello { /*...
To begin this blog with, I will Share Simple Java Hello World Program.
/**
*
* @author Eric
*/
public class Hello {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Hello World");
}
}
Understanding Above Code
Above program uses some Java keywords that are very important to know.They are explained below.
public- is access modifier.Public means the class it accessible to other classes in the same package.
Static-Methods declared as static don't require creation of a object to call them.They save memory for jvm.
void-method return type.Its means that the method is not required to return anything.
main-shows the main method that is called when program starts.
String [] args-these are command line arguments.
System.out.println-method used to output something to the screen after program execution.
class-keyword that is used to create a new class.
String [] args-these are command line arguments.
System.out.println-method used to output something to the screen after program execution.
class-keyword that is used to create a new class.