Is it fine if I don't write args in the below program? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Is it fine if I don't write args in the below program?

class myclass { public static void main(string[ ] args) { system.out.println("hello world"); } }

10th Feb 2018, 5:12 PM
AishSreesan
1 Answer
+ 1
As long as it's included as one of the parameters for main, then you're good. It doesn't need to be included within the function as it is mainly just a reference for the computer while running the program.
10th Feb 2018, 5:29 PM
Faisal
Faisal - avatar