Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Java Loops!
You have completed Java Loops!
Let’s learn about the while loop and how it repeats code as long as a condition is true. We’ll also see how to avoid common pitfalls like infinite loops.
Resources
If you're unfamiliar with Scanner or if-else statements, don't worry, they're taught in detail in an upcoming course. You can just follow along for now and consider it a sneak peak of what's to come.
Here is the Oracle documentation if you want to look into them further.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up