Can we change the access modifier in main method of java? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
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 Respuesta
+ 5
No. The main method has to be public.
17th Feb 2017, 3:56 PM
Tashi N
Tashi N - avatar