Java Filling array with numbers from 1 to X with a loop (not random numbers) : <p>I know that I can declare and initialize each array and transfer the numbers from 1 to X, but is it possible to fill an array with numbers from 1 to X with a loop?</p>

<p>I only know how to fill the array with 1 certain or random numbers, f. ex. like that:</p>

<pre><code>public class NurTests {
   public static void main(String[] args) {

       int [] arr = new int[100];
       int value = 1;
       for(int i = 0; i &lt; arr.length; i++){
           arr[i] = value;
       }
   }
}
</code></pre>
