Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Java Basics Perfecting the Prototype Censoring Words - Looping Until the Value Passes

Kevin Murphy
Kevin Murphy
835 Points

do while loop using Interger.parse.Int

Having trouble doing this loop and figuring out where and how to define the string when using int, and Interger.parseInt...

3 Answers

Bob Allan
Bob Allan
10,900 Points

Please include your code. Check out 'Markdown Cheatsheet' below.

Kevin Murphy
Kevin Murphy
835 Points

Sorry thought I did.. Ill have to read into the Markdowns sorry.. <p>''' do { String ageAsString=console.readLine("How old are you? "); int age=Integer.parseInt(ageAsString); if (age<13) { console.printf("%s\n",age); console.printf("Sorry, too young, try again.\n\n");

 }

} while (age<13); </p>'''

Kevin Murphy
Kevin Murphy
835 Points

Perhaps while I'm figuring out how to show code on HTML, you can tell me where to declare the primitive and wrapper data type?