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

Conditional int

Create an integer that stores "number of people" ( Use camel case). Set the value to 3.

1 Answer

Tonnie Fanadez
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Tonnie Fanadez
UX Design Techdegree Graduate 22,796 Points

Hi Nkosinolwazi Moyo

You declare an Integer simply by writing int with a small i

number of people written as camel-case is numberOfPeople just combine the words into one word, make the first letter small-caps while capitalizing the first letter of the other words.

Then you need to use =3 and a semi-colon to signify the end of the statement.

The full code should be as follows:

int numberOfPeople = 3;

cheers