Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBritni Alexander
10,888 PointsWhat is the different between using console vs. System.out?
I was taught using System.out. I've never seen console. What is the difference in these 2? How do their applications differ?
2 Answers
Craig Dennis
Treehouse TeacherHi Britni,
java.io.Console
was introduced in Java 6 and it was made to assist in simplification of common input output tasks.
In future courses I introduce System.out
and System.in
but I wanted to make sure what was happening with them was understood, before talking about static members.
Some IDEs have trouble using System.console, which might be why you haven't seen it, but it is the recommended way to write Console (Command line) Applications.
That help clear things up?
Britni Alexander
10,888 PointsYes it does! Thank you. This is a great refresher so far and it's nice picking up little things like this that I hadn't seen before.