for-loops

Learn how to use for-loops for counting and indexing.

For-loops in Java are identical to those in C and Javascript, and if you are familiar with those languages, you may skip this section. If you are most familiar with Python, you’ll want to work through this lesson carefully. Here’s a for-loop in Java:

Get hands-on with 1400+ tech skills courses.