code: public static int[] range(int start, int end) {
  		if (end <= start) {
  			return new int[0];
  		} else {
  			int[] rs = new int[Math.abs(end - start)];
  			for (int i = start; i < end; ++i) {
  				rs[i - start] = i;
  			}
  			return rs;
  		}
  	}
docs: Return an integer array containing consecutive integers from a given
  start value upto (but not including) a given end value.
  
  @param start
  The start value from which the range begins. This value is
  always the first element of the final array (assuming it's not
  empty).
  @param end
  The value up to which (exclusively) the range extends. This
  value is not in the final array. If this value equals or is
  less than the start value, then the empty array is returned.
  @return