Method in Java ..(functions in c , c++) . Main method .
public static void main( String args[]){}
This is main method of Java means starting point of program , this thing everyone knows ,let`s deep dive into Methods.
Methods ( Functions in c and c++) is a block of cod or collection of statement or a set of code group together to perform a certain task .
It helps to reduce code complexity , make our program more readable and faster .
In the main method--> Public is a Access modifiers means this method is accessible from anywhere in the program . This means our main program is accessible from anywhere.
Static---> Static is a keyword in java . Java is a language in which everything is written in classes and when we create class it is necessary that we also create its object , but in case of main method , it is the starting point of program and that main method is written inside a main class , so static help us to write and use class without creating its object .So , in the end static ensure to create class without creating its object .
Void---> void is a return type of method . Whenever we write a method it is necessary to declare its return type , means what method return after doing task .
main --> main is the name of the method.
String args[] --->Strings args represent array of command line argument .It captures any command line argument passed to the program during run time .Here "String" is a String object and "args []" is a conventional array name .