How to Create my First Program in Java

Hello World Program in Java:-

Class Hello
{
 public static void main(String [] args)
  {
   System.out.println(“Hello World!”);
  }
}

Output-

Hello World!

First Program in Java full Explanation

Class:– It is a keyword which is used to declare a class. It is also called User defined data type.

Public:– It is a keyword which is called access specifier. Three type access specifier used in java.
1. Public
2. Private
3. Protected.

Void:- It is a keyword. This method not should a return value.

main():- It is a entry point of any program.

String[]args:- It is a command line argument.

System.out.println:– It is used to print the data on the output screen.