Do not understand how loop is determining how many asterix to print : I am a beginner at learning Java. I have stumbled upon a problem that I can not figure out. How is the loop in the code determining how many asterisk to print out. I keep looking at this part of the code..
    asterisk < myArray[counter]

Could someone please explain in the simplest of terms how this works, because every time i think of the counter, i see it as nothing but the index that it is pointing to at that time in the loop. Thank you in advance. Full code below..
    public class Main {

    public static void main(String[] args) {

        int[] myArray = {12, 7, 9, 11, 23};

        System.out.println("Value Distribution");

        //Start of outer for loop
        for( int counter = 0; counter < myArray.length; counter++){

            //Start of inner for loop
            for( int asterisk = 0; asterisk < myArray[counter]; asterisk++)

                System.out.print("*");

                System.out.println();

        }//End of outer for loop