Can we change the access modifier in main method of java? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
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 Réponse
+ 5
No. The main method has to be public.
17th Feb 2017, 3:56 PM
Tashi N
Tashi N - avatar