Start with Java :
public static void main(String args)
The class name Hello. In java everything has to be in a class, even the main function must be defined inside class. in order to define a program, a class must include a method called main, like:
public static void main(String args)explanation :-
public : public is a keyword makes main as public to be available outside the class.
static : no object required to call the function main.
void : no return value.
main : name of function, must be defined inside class.
String args : arguments to function main, String is a class, args is name of array of string class type can be any name.
System.out.println :- System is inbuilt class, out is static object of this class and println is method name, used for print a line on console.
Hello Java :- "Hello Java" is argument to println method.
Compile & Run :- Now you have to install JDK(java development kit) on your machine and have to set the path. you can find no google how to set the path.
After all done, open command prompt and target the directory where your program file(You have to make this code in notepad and save this code with classname.java like in above class name is Hello, so u would save the file with name Hello.java) is saved.then type command javac Hello.java(javac for java compiler) for compile the program. and after successfully compile, type the command java Hello(for run the program).
Output :- Hello Java