# Method  in Java ..(functions in c , c++) . Main method .

<mark>public static void main( String args[]){}</mark>

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--&gt;** 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---&gt;** Static is a keyword in java . <mark>Java is a language in which everything is written in classes</mark> 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 <mark>main method is written inside a main class , so static help us to write and use class without creating its object</mark> .So , in the end static ensure to create class without creating its object .

**Void---&gt;** 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 --&gt;** main is the name of the method.

**String args\[\] ---&gt;**<mark>Strings args represent array of command line argument</mark> .It captures any command line argument passed to the program during run time .Here <mark>"String" is a String object</mark> and <mark>"args []" is a conventional array name</mark> .
