Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Java Basics Using your New Tools Coding the Prototype

What is wrong, completely stumped.

I seemingly have the exact code from the video copied, but it says I have 1 error in this line and I can't find it.

This is what's coded: console.printf("They are always %s %s.\n", adverb, verb);

And here's the error I'm getting:

TreeStory.java:22: error: reached end of file while parsing
console.printf("They are always %s %s.\n", adverb, verb);
1 error

Thanks for any and all help! :)

Damien Watson
Damien Watson
27,419 Points

Hey August, sometimes if you haven't closed brackets properly or quotes then the error appears on the next line. Are you able to show some of your code above this line?

3 Answers

Seth Kroger
Seth Kroger
56,407 Points

You're missing closing braces, {'s, on the subsequent lines.

You need a space here


should be

 %s. \n           //Space between . and \
Seth Kroger
Seth Kroger
56,407 Points

That spacing in the format string isn't necessary.

Newbie error, it was the closed brackets. >.<

Thank you!