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 trialJosephine Manda
5,856 PointsError 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,
2 Answers
Josephine Manda
5,856 PointsThank you team ,I found the answer.I had not closed the class and method with the }
alastair cooper
30,617 PointsThe 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
Ibrahim Alausa
236 PointsIbrahim Alausa
236 PointsHave you found a solution yet