"public static void main(String[ ] args)"for what we are using string[] args..what they perform in program? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

"public static void main(String[ ] args)"for what we are using string[] args..what they perform in program?

4th Jun 2018, 3:52 PM
Sridhar
3 Answers
0
it contain the arguments. if you have a programm prog and you call it via command line/terminal/shell as prog argument1 argument2 argument3 the argumends get saved in that array
4th Jun 2018, 3:54 PM
Max
Max - avatar
0
It is used as array of string which helps in take value from the user on command line.
4th Jun 2018, 4:01 PM
Ritesh Singh
Ritesh Singh - avatar
0
It is used to take input from command line. Command line arguments stored in this array.
24th Nov 2018, 6:25 AM
Ritesh Singh
Ritesh Singh - avatar