1 00:00:00,000 --> 00:00:09,323 [MUSIC] 2 00:00:09,323 --> 00:00:13,910 Now that we've learned about the arrays in Java, it's time for some more practice. 3 00:00:13,910 --> 00:00:17,950 In this session, you'll be getting practice with arrays and for loops. 4 00:00:17,950 --> 00:00:21,660 Let's look through what you'll need to do to complete the challenge. 5 00:00:21,660 --> 00:00:24,980 Attached to this video is a new workspace. 6 00:00:24,980 --> 00:00:28,290 Inside are a couple files to help get you started. 7 00:00:28,290 --> 00:00:32,610 You may recognize Cow.java from a previous practice session. 8 00:00:32,610 --> 00:00:35,500 But this practice session is about arrays. 9 00:00:35,500 --> 00:00:39,640 So let's click over to Arrays.java and see what we need to do. 10 00:00:39,640 --> 00:00:43,030 Start by creating an array of good cow names. 11 00:00:43,030 --> 00:00:47,060 This should be a string array, and can be whatever names you'd like. 12 00:00:47,060 --> 00:00:53,405 After that, create an array of cows that's the same length as your names' array. 13 00:00:53,405 --> 00:00:57,465 Next use a for loop to populate the cows array with 14 00:00:57,465 --> 00:01:01,930 cows using names from the names' array. 15 00:01:01,930 --> 00:01:04,050 And finally use an enhanced for 16 00:01:04,050 --> 00:01:09,900 loop to print the name of each cow from the cows' array in step two. 17 00:01:09,900 --> 00:01:10,990 So at the end, 18 00:01:10,990 --> 00:01:16,410 when we run the program, we should see a name of each of the cows in the list. 19 00:01:16,410 --> 00:01:19,450 Also if you don't remember how to run a program, 20 00:01:19,450 --> 00:01:21,780 remember that you'll start by clearing your workspace. 21 00:01:24,880 --> 00:01:26,250 Then compiling your project. 22 00:01:32,588 --> 00:01:34,372 And finally, running it with the java command.