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
Marcus Armitage
Courses Plus Student 473 Pointserror in the lessons.
When doing the conditional ints end code test there is an error with the checking program.
If you did the following:
int numberOfPeople = 3; if (numberOfPeople < 4) { console.printf("Your table is ready \n"); } system.exit(0);
The system.exit(0); variable is outside of the {}'s but it would still pass the test, This may confuse others to thinking this is the correct way to place that variable.
Marcus Armitage
Courses Plus Student 473 Points// This is the Int statement int numberOfPeople = 3; //this is the if statement if (numberOfPeople < 3) { console.printf("your table is ready \n") } // The System.exit(0) is outside the {} brackets System.exit(0);
Surely if this was run in the console it would not pass, However during the end of video test it would allow you to pass even if it was entered like the above? Or does it not matter where the System.exit(0); Goes?
Brendon Butler
4,254 PointsBrendon Butler
4,254 PointsI don't really see the error.. Could you elaborate on this?