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 trialJames Merritt
Courses Plus Student 394 PointsReached end of file while parsing error 10
console.printf("Hello, my name is James"); console.printf("James is learning to write Java"); }
Any ideas when I write the above I get this message please? Thanks
2 Answers
jacobproffer
24,604 PointsHey James,
Is this your entire code block? If so, try removing the closing curly brace, as there doesn't seem to be a need for it.
This compile-time error means that the compiler was expecting to see more source code when it got to the end of the file. This is almost always because of one or more missing closing braces. Typically, you'll receive this sort of error if you forget to end a while loop or if/else statement. But you don't appear to have an opening curly brace in the first place.
console.printf("Hello, my name is James");
console.printf("James is learning to write Java");
James Merritt
Courses Plus Student 394 PointsThanks Jacob, it turns out I had deleted a closed curly bracket from a lower line, once I added this in it worked fine. Thanks for the quick help!