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
.a{fill-rule:evenodd;}techdegree seal-36
Tonnie Fanadez
UX Design Techdegree Graduate 22,782 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;