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 trialGodfrey Adiges
2,146 PointsRead the comments and code below. We want to move that prompting code into a do while loop. Wrap the code into a do whil
This exercise is fairly difficult how would I complete it?
1 Answer
Luke Glazebrook
13,564 PointsHey Godfrey!
The basic structure for a do while loop in Java is as follows:
do {
//Put the code in here that you want to execute.
} while(i < 5); //This is where your condition goes.
Using the structure I have provided above try your best to complete the code challenge. If, after a few attempts, you are still having difficulties feel free to post back here and I shall further assist you!
Have fun programming.
-Luke
Godfrey Adiges
2,146 PointsGodfrey Adiges
2,146 PointsI've tried many times but still having difficulty
Luke Glazebrook
13,564 PointsLuke Glazebrook
13,564 PointsOkay, please could you post the information about the challenge and I shall walk through it with you and help you as best as I can.
Thanks!
-Luke
Godfrey Adiges
2,146 PointsGodfrey Adiges
2,146 PointsI just figured it out now. Thanks for your help
Luke Glazebrook
13,564 PointsLuke Glazebrook
13,564 PointsAwesome I am glad you managed to figure it out! Please mark a best answer in this thread so other forum users know that your problem has been solved!