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 trialHelena Loureiro
234 Pointsint numberOfPeople = 3; if (numberOfPeople < 4) { //Insert exit code console.printf("Your table is ready.\n");
I received an error that I did not understand for the following code:
int numberOfPeople = 3; if (numberOfPeople < 4) { //Insert exit code console.printf("Your table is ready.\n");
int numberOfPeople = 3;
if (numberOfPeople < 4) {
//Insert exit code
console.printf("Your table is ready.\n");
1 Answer
Adam Robinson
1,855 Pointsthe only thing that may be wrong with this is that you are not closing off the if block with a closing brace. this would cause a compiler error.
int numberOfPeople = 3;
if (numberOfPeople < 4) {
//Insert exit code
console.printf("Your table is ready.\n");
}