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 trialStuart Jessiman
465 PointsCreate an integer that stores "number of people" ( Use camel case). Set the value to 3. - don't understand the question.
Create an integer that stores "number of people" ( Use camel case). Set the value to 3. I don't understand the question.
int = numberOfPeople = ("3");
1 Answer
james south
Front End Web Development Techdegree Graduate 33,271 Pointsdrop the first = sign, the quotes around 3 and the () around 3. all you need to declare and initialize an integer in java is int variableName = 45; or whatever value you need.
Máté Tóth-Csák
7,509 PointsMáté Tóth-Csák
7,509 PointsI am a beginner myself as well, but the proper form should be:
java int numberOfPeople = 3;
The numberOfPeople is the name of the variable. You don't need an = after int :) Camel case means that every separate word, where you would have a space gets a capital letter. Eg. instead "number of people" you write "numberOfPeople".