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 Strings and Variables

I'm following all of the directions in the video and none of my code looks like it does in the video.

How can I start from scratch

Not exactly sure what you mean. Can you elaborate a bit more?

My output in the console doesn't look like what's in the video. Unfortunatley I couldn't copy and paste it for some reason :-/. I've got such a short windo w to do this in the morning.

3 Answers

If you look at the left hand side of the screen, there's an icon of a window with <> in it. That's the workspaces icon. Click on it and start a new workspace for your java class, and it should be the code that was put for you as prompt at the start of the class.

I don't understand how console.printf means sending the user a message. I thought that was system.out.println! Is there more than one way to send the user a message?

Craig's going to go over that later in the class. Basically, the java.io.Console package is an combination of System.in and System.out methods. println will print a string and then return the line at the end, like /n or %n. printf will take a string imbed several variables inside the string, but will not automatically return. For now, just use whatever he tells you, it will clear up. Happy coding!

Nicolas