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 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?