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 trialSantiago Selva
1,241 PointsI'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
Kourosh Raeen
23,733 PointsThe line:
Console console = System.console(),
should be:
Console console = System.console();
Kourosh Raeen
23,733 PointsIt 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");
Santiago Selva
1,241 PointsI 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
Seth Kroger
56,413 PointsCan you post your whole code?
Santiago Selva
1,241 PointsThats 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");
Santiago Selva
1,241 PointsSantiago Selva
1,241 PointsThanks!!! That was it! I don't know when i changed it