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 trialRAZA AHMED
56 Pointswhy we used console printf instead of using system .out.println
why we used console printf instead of using system .out.println
4 Answers
Rashida Range
209 PointsHey guys that's not true. The syntax absolutely exists in Java! This was just an option. Knowing the longer version is always best practice in my opinion ;)....There are other questions addressing this same concern.
Alexander Davison
65,469 PointsI don't think System.out.println()
exists in Java.
I might be wrong, though... I'm fairly new to Java.
RAZA AHMED
56 Pointsthanks bro..
Seth Kroger
56,413 PointsSystem.out.println() definitely exists as well as System.out.printf(). Console is just a convenience class for some methods on both System.out and System.in.
prasanna Paudyal
1,977 PointsSystem.out.println() and System.out.printf() both exist in java. But I am not sure about the console printf that treehouse is using here. Did treehouse write their own class for this? This is totally new way printing on the console in java. I haven't used this before. Are we trying to integrate javascript syntax with java?
Max Yun
277 PointsI don't know... yet, I'm still a beginner.
prasanna Paudyal
1,977 PointsTo My Prev Comment: Console class exists in java. Check this out: http://docs.oracle.com/javase/7/docs/api/java/io/Console.html