+ 1

Why we are not returning any value in a main function?

we run the code it does not give any error.

22nd Nov 2018, 4:24 PM
Jyoti Tiwari
Jyoti Tiwari - avatar
2 Respostas
+ 3
Please be specific about your question like mention the language or if possible share link of your post.
22nd Nov 2018, 4:27 PM
Шащи Ранжан
Шащи Ранжан - avatar
+ 2
If you are talking about Java....you can pass any number of String argument to main() method from command line public class Main { public static void main(String args[]) { System.out.println(args[0]); System.out.println(args[1]); System.out.println(args[2]); } } javac Main.java java Main hello world "hello world!!"
22nd Nov 2018, 6:30 PM
Rishi Anand
Rishi Anand - avatar