Populate int array with for loop in Java

First you need to define what numbers is, you have only declared it.

int[] numbers = new int[11];

Then insert the values you want.

for ( int i = 0; i <=10; i++)
{
    numbers[i] = i;
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)