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

Kimberly Kempf
Kimberly Kempf
422 Points

Not working

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 
      console.printf("Hello, my name is Kim");

  }
}

Edited to correct Java markdown

3 Answers

Kimberly Kempf
Kimberly Kempf
422 Points

Thank you everyone! I figured out I wasn't saving it prior to editing it.

Kimberly Kempf
Kimberly Kempf
422 Points

I mean saving it after I edited it. :)

Maciej Torbus
Maciej Torbus
8,137 Points

Hey Kim!

Did you compile your code correctly? Also take a look at this line:

<p> Console console = System.console( );</p>

Don't you have a blank space in the brackets?

Hi Kim,

I was able to copy your code and run it without error. As Maciej mentioned, did you compile it first before trying to run it? Below are the two steps to compile and run, inside the Console window.

javac Introductions.java
java Introductions

Best Regards