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 Using your New Tools Errors

Error Java Identifier expected.

I am a Java beginner and have been following instructions on my workspace ,exactly inputting what the tutor was instructing me to input but I keep on getting this error message.

TreeStory.java:16: error: <identifier> expected
console.printf("%s is very %s",name,adjective);
^
TreeStory.java:16: error: <identifier> expected
console.printf("%s is very %s",name,adjective);
^
4 errors

How do I solve this one,

Have you found a solution yet

2 Answers

Thank you team ,I found the answer.I had not closed the class and method with the }

alastair cooper
alastair cooper
30,617 Points

The error is on line 16. It is expecting a class identifier. This error message is commonly caused by a missing import statement and therefore the compiler is trying to use a class you haven't told it about.

Check your imports. If that doesn't solve it, then post your code and I'll have a look for you