Standard Streams

4 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€86.30
List Price:  €120.82
You save:  €34.52
£74.61
List Price:  £104.46
You save:  £29.85
CA$137.64
List Price:  CA$192.71
You save:  CA$55.06
A$154.65
List Price:  A$216.52
You save:  A$61.86
S$128.63
List Price:  S$180.09
You save:  S$51.45
HK$784.78
List Price:  HK$1,098.73
You save:  HK$313.94
CHF 80.41
List Price:  CHF 112.58
You save:  CHF 32.17
NOK kr1,032.35
List Price:  NOK kr1,445.34
You save:  NOK kr412.98
DKK kr644.05
List Price:  DKK kr901.70
You save:  DKK kr257.64
NZ$169.01
List Price:  NZ$236.62
You save:  NZ$67.61
د.إ367.26
List Price:  د.إ514.18
You save:  د.إ146.92
৳12,121.40
List Price:  ৳16,970.45
You save:  ৳4,849.04
₹8,610.19
List Price:  ₹12,054.61
You save:  ₹3,444.42
RM424.85
List Price:  RM594.81
You save:  RM169.96
₦152,771.72
List Price:  ₦213,886.52
You save:  ₦61,114.80
₨28,497.15
List Price:  ₨39,897.15
You save:  ₨11,400
฿3,251.47
List Price:  ฿4,552.19
You save:  ฿1,300.72
₺4,028.08
List Price:  ₺5,639.48
You save:  ₺1,611.39
B$556.82
List Price:  B$779.57
You save:  B$222.75
R1,789.93
List Price:  R2,505.97
You save:  R716.04
Лв168.67
List Price:  Лв236.14
You save:  Лв67.47
₩139,216.21
List Price:  ₩194,908.26
You save:  ₩55,692.05
₪335.61
List Price:  ₪469.87
You save:  ₪134.26
₱5,726.02
List Price:  ₱8,016.66
You save:  ₱2,290.63
¥14,862.43
List Price:  ¥20,807.99
You save:  ¥5,945.56
MX$1,881.25
List Price:  MX$2,633.82
You save:  MX$752.57
QR363.36
List Price:  QR508.72
You save:  QR145.36
P1,349.68
List Price:  P1,889.60
You save:  P539.92
KSh12,923.70
List Price:  KSh18,093.70
You save:  KSh5,170
E£4,941.52
List Price:  E£6,918.33
You save:  E£1,976.80
ብር13,825.55
List Price:  ብር19,356.32
You save:  ብር5,530.77
Kz91,186.38
List Price:  Kz127,664.58
You save:  Kz36,478.20
CLP$97,077.66
List Price:  CLP$135,912.62
You save:  CLP$38,834.95
CN¥717.92
List Price:  CN¥1,005.12
You save:  CN¥287.20
RD$6,026.40
List Price:  RD$8,437.20
You save:  RD$2,410.80
DA13,016.54
List Price:  DA18,223.68
You save:  DA5,207.13
FJ$226.22
List Price:  FJ$316.72
You save:  FJ$90.50
Q766.74
List Price:  Q1,073.46
You save:  Q306.72
GY$20,906.23
List Price:  GY$29,269.56
You save:  GY$8,363.33
ISK kr12,238.77
List Price:  ISK kr17,134.77
You save:  ISK kr4,896
DH904.11
List Price:  DH1,265.79
You save:  DH361.68
L1,699.79
List Price:  L2,379.78
You save:  L679.98
ден5,295.15
List Price:  ден7,413.43
You save:  ден2,118.27
MOP$807.98
List Price:  MOP$1,131.21
You save:  MOP$323.22
N$1,793.78
List Price:  N$2,511.36
You save:  N$717.58
C$3,677.38
List Price:  C$5,148.48
You save:  C$1,471.10
रु13,736.94
List Price:  रु19,232.27
You save:  रु5,495.32
S/355.84
List Price:  S/498.19
You save:  S/142.35
K412.28
List Price:  K577.21
You save:  K164.93
SAR375.06
List Price:  SAR525.10
You save:  SAR150.04
ZK2,278.40
List Price:  ZK3,189.86
You save:  ZK911.45
L437.81
List Price:  L612.96
You save:  L175.14
Kč2,126.07
List Price:  Kč2,976.59
You save:  Kč850.51
Ft34,443.95
List Price:  Ft48,222.91
You save:  Ft13,778.96
SEK kr975.87
List Price:  SEK kr1,366.26
You save:  SEK kr390.38
ARS$126,136.94
List Price:  ARS$176,596.76
You save:  ARS$50,459.82
Bs690.53
List Price:  Bs966.78
You save:  Bs276.24
COP$403,727.98
List Price:  COP$565,235.32
You save:  COP$161,507.34
₡50,423.54
List Price:  ₡70,594.98
You save:  ₡20,171.43
L2,614.17
List Price:  L3,659.95
You save:  L1,045.77
₲773,801.72
List Price:  ₲1,083,353.36
You save:  ₲309,551.64
$U4,044.70
List Price:  $U5,662.74
You save:  $U1,618.04
zł367.13
List Price:  zł514.01
You save:  zł146.87
Already have an account? Log In

Transcript

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.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.