8.3 The tables Part-3

Hello everyone welcome to this new course, in this course we are going to display the values that are in ... our array we are going to use the for loop so for int i equals 0 semicolon i less than ... length of the array so tab.length which corresponds to the size of our semicolon array we are going to increment i ++ ... in our forum, we will display the index and the value that corresponds sprint index equals we will concatenate with ... i have more to put the equal here and concatenate it with the value that is found in our table you ... surely had to ask you a question What is the i for which it is tab[i] here in ... our heart, we have a condition that says i equal to 0 as long as i is less than the length ... of table equal to three i will be less as long as i is less we increment the value of i ... so at the first all i go are equal to 1 we will take the value that corresponds to the index —so at index 1 we’re going to see the value that corresponds to index 1 and i is only going to correspond to ... at index we’re going to compile our program and see the result as you see index 0 and here, this is the ... length of our tab so index 0 equals 1 as displayed in our table At index 2 34 then ... 12 for index 3 12 since in index 2 we changed the value that corresponds before it was ... 56 remember that we have… in a table before it was 56 we overwritten this value we put ... so that’s why in the console we Avon 12 I hope you understood how to initialize how to declare how ... display the value of a table we will do an exercise in this exercise you will declare a table that will ... are equal to different pay you can put 3 or 4 and then you will display the countries that you ... have assigned but also the indexes putting in pause and perform this exercise so see you soon I hope you have ... passed this exercise to do it I declared a String table then I put France as the first element Belgium ... in second and for the third I put Germany then to display them I used the loop for I went through ... the loop for then I concatenated I displayed pardon the index and the corresponding country we will compile the program ... and see the result as you see in the console index 0 which corresponds to France index 1 which ... corresponds to Belgium 2 Germany in the next course we will perform a challenge which will go us allow to take ... in hand the tables See you soon.