public static void main(String args[]){
}
Why
}
Why
- public ----- so that jvm can get control of main method from anywhere
- static ---- so that main method could be accessed without any object reference
- void .... main method does not return value
- String args[] ---- when you are executing jar file with java class with main method in it. we can pass String arguments to main method if needed.