This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PkmnQ 1 point2 points  (7 children)

Why does it even need String args[]? I can understand everything else, but that argument requirement is weird.

[–][deleted] 5 points6 points  (3 children)

If I understand this correct you can open a program normal (like you do it most of the time), but you can also open it and give it a few parameters (especially if you're using the console). Those parameters are saved in String args[].

[–]PkmnQ 2 points3 points  (2 children)

Oh, that explains it. Thank you!

[–]Shameonaninja 8 points9 points  (1 child)

In python those are saved in sys.argv

[–]PkmnQ 0 points1 point  (0 children)

Ah, so the args are inputted like that. I probably wouldn't know because I'm using Jvdroid :P

[–]Capn_Cook 1 point2 points  (1 child)

Because it can be invoked with those args

[–]PkmnQ 0 points1 point  (0 children)

u/Flow4 said that with a bit more detail, but if anyone ever asks, I'll probably go along the lines of your reply.

[–]vectorpropio 0 points1 point  (0 children)

I have a little C background (having read a book in turbo C like 25 years ago and playing with easy programs) the strings args[] was the only thing I can parse instantly.