Can we change the access modifier in main method of java? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Can we change the access modifier in main method of java?

If yes then please explain.

17th Feb 2017, 12:09 PM
Harvansh Singh
Harvansh Singh - avatar
1 ответ
+ 5
No. The main method has to be public.
17th Feb 2017, 3:56 PM
Tashi N
Tashi N - avatar