+ 4
What is command line argument?
what is its use?
2 Réponses
+ 3
When you run scripts from the command line, you can pass arguments to it, such as:
$ test.py inputfile.txt output.txt
Files are common arguments, but they can e anything that you want some sort of input for. How you access those arguments depends on the language. I wrote some code as an example of how it works in Python, I'm sure it gives a good idea for other languages too:
https://code.sololearn.com/cr44589IWqoB/?ref=app
+ 1
while interpreting the Java file with java cmd, you can pass arguments ie. String arguments.