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

Joseph Roa
Joseph Roa
209 Points

Help defining a string variable.

Hello everyone,

First day and I continue to get this compiler error:

"JavaTester.java:73: error: ';' expected Import java.io.Console; ^ JavaTester.java:73: error: not a statement Import java.io.Console; ^ 2 errors"

I am making adjustments based on the error its pointing out but when I make changes something else gets an error. Can someone help explain to me what I am doing wrong?

2 Answers

Jeff Wilton
Jeff Wilton
16,646 Points

Java import statements need to have a lowercase 'i', so try this:

import java.io.Console;
Joseph Roa
Joseph Roa
209 Points

Thanks for responding Jeff. I tried that initially and it did not work either. It gave me this:

JavaTester.java:73: error: illegal start of expression import java.io.Console; ^ JavaTester.java:73: error: not a statement import java.io.Console; ^ 2 errors

Make sure that your Import java.io.Console; // notice that this is above the start of your class.

public class example{