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

I'm doing something wrong but don't know what

I don't know what i'm typing wrong and this message appears:

8 errors
treehouse:~/workspace$ javac Introductions.java
Introductions.java:8: error: ';' expected
console.printf ("Hello, my name is Santiago");

4 Answers

The line:

Console console = System.console(),

should be:

Console console = System.console();

Thanks!!! That was it! I don't know when i changed it

It looks like you're missing a semicolon at the end of the line: console.printf ("Hello, my name is Santiago")

Make sure it looks like:

console.printf ("Hello, my name is Santiago");

I copy paste what you wrote, then I saved it but the same message keeps appearing...

treehouse:~/workspace$ javac Introductions.java
Introductions.java:8: error: ';' expected
console.printf ("Hello, my name is Santiago");
^
1 error

Can you post your whole code?

Thats the hole 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 Santiago"); 

} }

Then I type:

javac Introductions.java

And this appears: ^
1 error
treehouse:~/workspace$ javac Introductions.java
Introductions.java:8: error: ';' expected
console.printf("Hello, my name is Santiago");