Codecademy Learn Java, Iterating over an ArrayList

Channel:
Subscribers:
8,020
Published on ● Video Link: https://www.youtube.com/watch?v=qA1n9wo-6Fo



Duration: 3:13
120 views
1


In this Codecademy Learn Java lesson we go over iterating over an ArrayList. In java we can repeat go through the contents of an array using a for loop and the size method. Our for loop is made up of three parts. First we initialize our for loop counter. Then we create a condition that will evaluate to true or false. Then as long as the condition is true we do something, usually increment or decrement our counter. Once an expression evaluates to false the for loop breaks out. In this specific challenge we are asked to create a for loop and iterate over our weeklyTemperatures array. While we iterate through our array, we print out the current value we are in.







Tags:
java tutorial
learn java programming
java language
java arrays
insert elements in java
iterate