0
I used a for loop to get individual elements within a loop while looping the array, as you can see my code below but I knew the
Is there a way to use a for each loop to get each element individually while looping? Like when I loop through a review website to get each review but obviously here I don't have an idea of the length of reviews on that page. Any ideas or a source code will be appreciated. https://code.sololearn.com/cPUvwX4WhUCF/?ref=app
2 Réponses
+ 1
If I understood right your code, you want to show each text in each index right?
Then you will do so or use if else
String first = my_array[0];
String second = my_array[1];
String third = my_array[2];
String fourth = my_array[3];
0
I used a for loop to get individual elements within a loop while looping the array, as you can see my code below but I knew the index length of the elements.