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, Variables, and Formatting

JavaTester.java:73: error: illegal start of expression public class Introductions { 1 error I dont´know how to start

I don´t know how to start the code. I followed the instructions of the video but also in the workspace returns me an error JavaTester.java:73: error: illegal start of expression public class Introductions { ^ 1 error treehouse:~/workspace$ java Introductions
Picked up JAVA_TOOL_OPTIONS: -Xmx128m
Picked up _JAVA_OPTIONS: -Xmx128m

Name.java
// I have setup a java.io.Console object for you named console 
public class Introductions {

    public static void main(String[] args) {
        Console console = System.console();
        String firstname = "Moises";
        console.printf("Hello, my name is %s", firtsname);
  }
}

1 Answer

Hi there,

It is complaining that it's received code it wasn't expecting to see.

In this challenge, you just need to create a string variable that contains your name. Call it firstName. No other code is required; just one line assigning your name (or any string) into a string variable.

Steve.