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 trial

Java

Okay, im really confused as to why you guys switch from console.printf to System.out.println, and from console.readLine

Why are you guys switching from System.out.println to console.printf, and console.readLine() and Scanner.nextLine().... It's kind of annoying that you guys switch around without giving an explanation......

Can someone explain, please?

1 Answer

No real reason to it, I've always used System.out.println() and a scanner for input when following these videos.

As far as I understand System.console() can only be used via a Console / Terminal where as System.out use the "default platform".

It really shouldn't come up much in future programming and when making your own applications just use whatever you prefer.