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 Perfecting the Prototype Conditional ints

add an if statement to see if there are less than 4 people. Then write out to the console your table is ready

add an if statement to see if there are less than 4 people . then your table is ready

Conditional.java
int numberOfPeople=3;
if (<4) console.printf("your table is ready.\n");

2 Answers

Hi,

you forgot to compare the <4 to a variable or value in your condition. It should be:

if (numberOfPeople<4) {
   console.printf("your table is ready \n");
}
Adam Bell
Adam Bell
1,176 Points

Hi Mario. Thanks for your help. I had trouble with this task too but you explained exactly what I was overlooking.