main method is a standard method used by JVM to execute any java program(Java SE). - Can we write static public void main(Str

Q

main method is a standard method used by JVM to execute any java program(Java SE). - Can we write static public void main(String [] args)?

✍: FYIcenter.com

A

Yes we can define main method like static public void main(String[] args){}
Order of modifiers we can change.
package instanceofjava;
public MainDemo{
static public void main(String [] args){

}
}

2015-07-01, 498👍, 0💬