Simple Hello Word Program to understand basic keywords
class
Manager {
System.out.println("Hello Words");
}
}
Terminology:
public:
It can be accessible from anywhere.
static:
No need to create the object to run the method.
void:
It means main method is not returning any value.
main:
It’s a method name from where execution will get started.
String[] args:
It’s an array of string type which can be filled by passing run time value if required.
System.out.println:
This statement will print the enclosed the value. In this case After execution output will be Hello Words on the screen.
class:
It tells the compiler where the class starting point with class name.
How to compile the program:
cd C:\Program Files\Java\jdk1.6.0\bin and then press enter.
Note: Here no need to give .class while running the java program. Automatically it reads the class file only.