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 Receiving Input

I followed the steps for the "what is your name" prompt but when I press enter I keep getting "Hello my name is ...

Is it possible for me to restart the workspace from scratch? I think I may have missed a step

2 Answers

rydavim
rydavim
18,813 Points

Before starting over from scratch, remember you can always ask our helpful community to take a look at your code. But if you'd like to go back to the beginning...

This is the starting code for that video:

import java.io.Console;

public class Introductions {

    public static void main(String[] args) {
        Console console = System.console();
        // Welcome to the Introductions program!  Your code goes below here
        String firstName = "Ben";
        //thisIsAnExampleOfCamelCasing
        console.printf("Hello, my name is %s\n", firstName);
        console.printf("%s is learning how to write Java\n", firstName);
  }
}

You can also launch a fresh copy of any workspace template with the following steps:

  1. Click the Launch Workspace button at the bottom right of the video.
  2. Instead of clicking the green Launch it! button, click over to the grey link that says Launch Different Workspace.
  3. From this page, create a new workspace.
  4. From the last drop down, select the template you'd like to use. In this case, Getting Started with Java - Receiving Input.

Let me know if you have any questions, and happy coding!

Great, managed to launch a fresh copy of the workspace and follow the steps again without encountering any of my previous challenges. Thank you for the advice!