Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Practice Input and Output in Java!
You have completed Practice Input and Output in Java!
Preview
This is how I solved it! How'd you do?
Learn more
- You might've noticed I used
%nfor new line, instead of the escape sequence\n. The reason for this is that Windows and Unix based systems (Like Mac and Linux) use different newline sequences.%nmakes the proper distinction.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
And you're growing and honing your skills
through that process.
0:00
So here's how I did it.
0:01
I needed to create a string name place,
and the place
0:03
I chose is called Kwik E Mart.
0:06
So there we are.
0:10
There's Kwik E Mart
inside of a string literal.
0:11
And then I use the read line
method off of the console object.
0:15
Note that it is CamelCase.
0:20
It’s readLine - two words
jammed together with an uppercase L,
0:22
and I left a few spaces behind it
so the user can type on the same line.
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up