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

Antoine DuBois
Antoine DuBois
3,130 Points

I keep receiving error messages and i dont know why. please give me feedbac

TreeStory.java:22: error: not a statement                                                        
        console.printf("They are always %s %s.\n", adverb, verb);                                
                                                           ^                                     
TreeStory.java:22: error: ';' expected                                                           
        console.printf("They are always %s %s.\n", adverb, verb);                                
                                                               ^                                 
8 errors                                                                                         
treehouse:~/workspace$                                                                           
w

4 Answers

Patrick Koch
Patrick Koch
40,498 Points

Hi Antoine ,

Hard to say without the code, you wrote :-)!

g patrick

Antoine DuBois
Antoine DuBois
3,130 Points

Thanks, but I actually figured it out.

Rui Bi
Rui Bi
29,853 Points

Did you properly declare adverb and verb as String objects?

Antoine DuBois
Antoine DuBois
3,130 Points

I accidentally transposed the "\n" on line 20. Once I fixed it, the code ran as it should.