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

The code doesn't compile

I entered the code :

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 Craig");
     console.printf("Craig is learning how to write java");        

} }

then in the console i write

javac Introductions.java java Introductions

but after that nothing hapend... no errors in the console

2 Answers

Hey Luciano,

I don't see any syntax errors in your code. Everything seems to print out to the console on my end.

When attempting to compile the program with, "javac Introductions.java," are you making sure to hit enter before typing, "java Introductions"?

Best,

Jacob

Thanks for your time Jacob i had reset mi pc and everything works now O.o why? i dont know haha but thanks :D best answer!

Best,