package arrays;

//import java.lang.Math;
import java.util.Random;

public class AufgabeArrayEinfach {

	Random r = new Random(); 

	public int[] createArray(int from, int to, int size){
		int result[] = new int[size];
		for (int ii = 1; ii< result.length; ii++) {
			result[ii] = this.r.nextInt(to-from+1);
		}
		return result;
	}

	public void printArray(int[] array){
		for (int ii = 0; ii< array.length; ii++) {
			System.out.print(array[ii]+ " ");
		}
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		AufgabeArrayEinfach arrayEinfach = new AufgabeArrayEinfach();
		int result[] = arrayEinfach.createArray(2, 15, 30);
		arrayEinfach.printArray(result);
	}

}

@@ -239,17 +239,17 @@
 nt ii = 
-1
+0
 ; ii%3C re
@@ -457,16 +457,169 @@
 rray%5Bii%5D
+ + %22 %22);%0D%0A%09%09%7D%0D%0A%09%09System.out.println(%22 %22);%0D%0A%09%09// Alternativer Syntax f%C3%BCr Zugriff auf alle Feld-Elemente%0D%0A%09%09for (int ii: array ) %7B%0D%0A%09%09%09System.out.print(ii 
 + %22 %22);%0D

Update For-loop