public static void main(String[] args) is predefined method or user-defined? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

public static void main(String[] args) is predefined method or user-defined?

11th Nov 2016, 7:20 PM
Vaibhav Kharche
Vaibhav Kharche - avatar
7 Answers
+ 1
it is user defined, it is a start point for user code, when applications finisheds initialization it calls main function, app knows where main function is stored
11th Nov 2016, 7:31 PM
Дмитрий Шкурко
+ 1
That means it's syntax is predefined right?
11th Nov 2016, 7:50 PM
Vaibhav Kharche
Vaibhav Kharche - avatar
+ 1
prototype is predefined
11th Nov 2016, 7:56 PM
Дмитрий Шкурко
+ 1
thank you for your explanation..
11th Nov 2016, 7:59 PM
Vaibhav Kharche
Vaibhav Kharche - avatar
0
I have a doubt that if it is user-defined then why we can't change it's peototype?
11th Nov 2016, 7:37 PM
Vaibhav Kharche
Vaibhav Kharche - avatar
0
for example, when you'll change number of arguments application won't find your function to call, cause there is a convention for start point function
11th Nov 2016, 7:47 PM
Дмитрий Шкурко
0
thank you for your explanation..
11th Nov 2016, 7:59 PM
Vaibhav Kharche
Vaibhav Kharche - avatar