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

Filip Juriš
Filip Juriš
768 Points

Create an integer - Perfecting the prototype

Hi, can somebody help me with my problem, ´cause i do not know what to do there.

Thnx for answer

Conditional.java
String numberOfPeople = console.readLine("Number of people: %s  ");
console.printf("Number of people: %s  ");

1 Answer

Stone Preston
Stone Preston
42,016 Points

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

you created a string, also you dont need to get input from the console.

Simply create an int variable and assign it the value 3:

int numberOfPeople = 3;