0

What does "String[] args)" in a Java Code mean?

Java

3rd Dec 2022, 12:13 AM
Andrea
7 Answers
+ 6
String[] args is the conventional part of the signature of the main function. When you run a Java program, the main function is executed. If you run the program from the terminal (command line), you can add some parameters that the program can work with. These parameters are captured in the array of String, which is in the signature, and you could process them inside the program. On Sololearn you cannot really test this, because we cannot provide runtime arguments.
3rd Dec 2022, 11:19 AM
Tibor Santa
Tibor Santa - avatar
+ 1
Thanks
3rd Dec 2022, 12:17 PM
Andrea
0
Ouch
3rd Dec 2022, 2:09 AM
Andrea
0
Can you explain it to me?
3rd Dec 2022, 2:10 AM
Andrea
0
I must somehow missed it
3rd Dec 2022, 2:10 AM
Andrea
0
I can already do math and comments in java. So i studied.
3rd Dec 2022, 2:16 AM
Andrea
0
🫠🏃
3rd Dec 2022, 11:16 AM
Mahmoud Mohamed Thabt
Mahmoud Mohamed Thabt - avatar