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

ALICIA WEENUM
ALICIA WEENUM
51 Points

It's giving me an error message once I complie it.

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 Alicia\n");
    console.printf("Alicia is learning how to write Java\n");    

} }

This is what I have and then it sends me this

Picked up _JAVA_OPTIONS: -Xmx128m
Introductions.java:8: error: not a statement
console,printf("Hello, my name is Alicia\n");
^
Introductions.java:8: error: ';' expected
console,printf("Hello, my name is Alicia\n");
^
2 errors

2 Answers

ALICIA WEENUM I believe your issue is that you have a comma instead of a period in your first console.printf() statement... let me know if this fixes your issue.

You also have to save the file before compiling it !