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 trialsamuel martinez campeau
248 Pointsit syas tehres a probleme when im doing it good
so in task 2 of 3 i did what im supposed to do and it sya sist worng this is my code:
int numberOfPeople = 3; if (4 < numberOfPeople) { // preparing game console.printf("Your table is ready"); }
1 Answer
anil rahman
7,786 PointsIn your if condition you put if 4 is less than people when it should be: if the amount of people is less than 4
Also your comment in the if block was commenting out the console.
int numberOfPeople = 3;
if (numberOfPeople < 4)
{
// preparing game
console.printf("Your table is ready");
//exit program
System.exit(0);
}