Why do we write (string []srgs) nearby main? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why do we write (string []srgs) nearby main?

Also what if I write it as (string [] srgs) or (String[] SRGS). I just want to know what is its significance and are there any alternatives for that?

6th Sep 2017, 7:42 AM
noble
4 Answers
+ 5
The String[] args is a way of passing the input to the program. in Java args contains the supplied command-line arguments as an array of String objects.
6th Sep 2017, 8:03 AM
P R
P R - avatar
+ 4
i wrote a small book on java https://abdurrahmaanjanhangeer.wordpress.com/my-new-book-java-a-presentation/ it is explained in the first pages ! note : more details there !
6th Sep 2017, 7:47 AM
Abdur-Rahmaan Janhangeer
Abdur-Rahmaan Janhangeer - avatar
+ 1
Thanks mate.
6th Sep 2017, 7:57 AM
noble
+ 1
Passing as in allowing? @P R
6th Sep 2017, 8:08 AM
noble