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 Basics Getting Started with Java Introduction to Your Tools

About the learning way

O.K. So I am just a little confused so I will explain why, I am in uni and taking a Java class. Our instructor is horrible so I figured I would try teamtreehouse to help as I know you are all very good at what you do. How ever I am confused because your methods is absolutely completely different code wise. Like they make you use System.out.println and System.out.print and etc. but you use printf so Is this course reccomended to go along with a uni course? because . The last thing I want is to get even more confused then the Uni teacher has me but I really need to get good in regular java.

2 Answers

System.out.printf is a method used to print out formatted text.
I was not taught it in my course either, as my teacher wanted to take a more object oriented approach, using classes like DecimalFormat instead. System.out.print and System.out.println are also much simpler for people who are new to Java/programming, and don't yet need to worry about that kind of thing.
Once you get to the bigger concepts like Object Oriented Programming and Inheritance, these small differences wont be as relevant. Stick with it and it will all make sense soon!

So if I just do the teamtreehouse course it will make me efficient in java even if its different then the uni course? Treehouse here teaches a 100 times better then the uni as i said I was just worried I was not learning the right java lol

There may be a few small differences, such as the one you have encountered with print, println, and printf, but once you get deeper in to the content, you will be able to note these differences and find workarounds.
Use treehouse to supplement your knowledge, but in cases like these try to stick to how your professor shows you. Having the knowledge of how to do things both ways will make you a better programmer in the end!