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

JAVA CONSOLE.

Is using console in java important , if yes, Why? i'm a newbie to coding and my college tutor told us to use System.out.print only and never talked about console.

1 Answer

andren
andren
28,558 Points

Did you use any kind of Java IDE like IntelliJ, Eclipse or Netbeans In your college course? The console object is often avoided by lecturers because it for various technical reasons does not work when you run your code through most IDEs. Which is an issue since IDEs are quite common in the Java development world.

I would not say the console object is hugely important. There are alternatives ways of achieving the main things it does (printing and getting input from the console) but they tend to be a bit more complex, and require separate classes. Which is likely why Treehouse choose to use console for these beginner courses.

Once you get to the more advanced courses where the instructors switch to using an IDE to teach concepts, then you will end up switching away from using the console class.