Here you can find the source of range(int begin, int end)
public static int[] range(int begin, int end)
//package com.java2s; //License from project: Open Source License public class Main { public static int[] range(int begin, int end) { int[] ret = new int[Math.abs(end - begin)]; int index = 0; for (int i = begin; i < end; i++) { ret[index] = i;/*from w w w. j a v a 2 s. c o m*/ index++; } return ret; } }