I was recently asked in an exam if public static void main(String arg[]) format of main method was fixed?
Can we change it?
Can we use main>
public-main() method must be used by any one of the outside the class as well as inside the class so its public
static-static is necessary bcoz in java if we define class than we define object for that class and than and only than we can use that class..but instead of this we directly use by write the word static
void-for main() cant return any value like int or char main()-main is the function or method which we can use for accessing the future of java String-in java all we write consider as a string args-arguments