So in this video we are going to look at the standard stream and most languages have some sort of support for you know, some standard input output where you you know, the user program can take input from keyboard and then produce on producing output on the screen. If you are familiar with C, c++, then you know about like the, you know, standard namespace in c++ the standard input and the standard I pose, do you know the source no C in and C out and Java has very similar stuff to that as well. So first thing that you want to do is do an import. So import java.io dot asterisk semi colon, like them, and we are going to pros are going to throw an exception. This is just required to know mounting. Okay, so you would need an rupt this instance or try catch block.
So feel free to check out the exception part of this series. For now we'll just do it with empty. So we're going to do input stream reader. And we'll call it in equal No. And in equal you input and you just do it so and now what we're going to do is do a system, system dot print and we are going to soon and how And we'll say he will need to get the card to show character accorded chip. Why not chip, I'm going to do a do while loop.
And the reason we're doing it instead of a wallet, for example, is we want to get the input at least once. And if that input happened to be, you know, a, then we would accidentally. So in here the condition is going to return not equal to a, if it's not equal to. We'll continue doing this and what we're doing here, we will do Sure. We're going to test the input that we get, even if it's nothing, we input a number. We'll still want to cast it to true equals to read, like so.
And we're just going to print today. You can just see what we're actually printing And so And finally, we just need to close our screens in close, like so. And you would only do this if n is not equal to No, otherwise, you wouldn't create it for whatever reason always already close. It's a good check to do like so. And now let's see what we got. So it says enter character.
So if I type in a it's accident, he won't know anything else in for running again, however, and I'll type in all of it up and over again, for talking you type in you type in search. And there we go. So that is it for getting input from The screen four I put in to the console, obviously, as well. So this is using the standard screen. There are obviously other ways to get input from the user while the console which we've covered, but this is just sort of part of the File Stream section. If you have any questions, feel free to reach out.
I look forward to seeing you in the next awesome video.