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 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,412 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,412 Points

That spacing in the format string isn't necessary.

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

Thank you!