Java tutorial
//package com.java2s; public class Main { /** * Creates an integer range 0,1,2,...,n-1. * * @param n the length of the range * @return the range */ public static Integer[] createIntegerRange(final int n) { final Integer[] range = new Integer[n]; for (int i = 0; i < n; i++) { range[i] = Integer.valueOf(i); } return range; } }