Hello, in this video we are going to cover command line arguments. So if you were to run your, you know your application via command line, and provide extra, you know, value so these arguments right here, so we, so this has just been a given that we've got an array of string data, it's called odds. So if you were to pass something in, and we can use those values, so let me just show you how to, you know, use the values and how to actually you know, pass them in. So, to use them all we're going to do print them out. So I was gonna do a for each loop. Try doing this yourself over this.
All right, and the sum up is just the datatype of the single element you can they want a long the name of the array. There you go. There's your system as incline and I do sto So, and then what you want to do is go to your application folder, so your workspace MySQL tutorial, and in SRC the Java file not in there, when you go to the bin file, where your class you know, is, you don't want to, you know, access this yet, because you want to actually compile it from here. So if I build it, and you can see I've compiled it for you compile it via command line or something else, that's fine as well. But this has been compiled on the native version now. So if we go to console, which I did see the drag and drop, this goes to the correct folder.
And now you type in the keyword Java. That's the same going to run a Java application, the name of the application for phone systems. You don't need to put class and click enter. So that's running, that's fine there. Why freaking didn't print anything else? So let me before I provide the command line arguments, let me To show you that it doesn't work the print line application say that I can go step further.
I will run this again. Do okay. So other than a minute, it would appear that when I save it, and actually come piles it as well. Not interested. So I didn't know that. There enough indeed.
Love these components, right? So that's pretty cool. So how do you pass in the command line argument? It's simple. After you put Java in the name of your application, base. Hello.
It prints out Hello. So I've printed space and then I say a random color. To say, My name for another screen, so for the.it will still be one. Think. So it printed them all out. So that's how you provide command line arguments you might have left to play the game.
Well, if you don't you buy steam, you can provide some sort of launch options, and they're like command line arguments. And it might be something to do with, you know, changing the performance or changing sort of asset or a load is some to the graphical settings or debug mode or you know, anything really. And the application will first check for any valid arguments. If, if you get one, then you do something accordingly. That's how you provide command line arguments. And this is how you handle command line arguments.
If you have any questions, feel free to reach out, and I look forward to seeing you in the next fulsome video.