+ 1

Can we make changes in main method in JAVA.

class Solo { static public void main(String[] solo) { // Is this valid main method ? } }

6th Feb 2020, 6:52 PM
JAIN
JAIN - avatar
2 Respuestas
+ 6
Yes you can replace position of public and static with each other. The string array can have any valid name. It can be (String...a) also. You can even add final keyword to the main method and it would still work.
6th Feb 2020, 6:56 PM
Avinesh
Avinesh - avatar
0
Yes it's your own program so you write your own code there.
7th Feb 2020, 2:41 AM
Sonic
Sonic - avatar