Here you can find the source of range(int start, int end)
public static int[] range(int start, int end)
//package com.java2s; //License from project: Apache License public class Main { public static int[] range(int start, int end) { int[] range = new int[end - start]; for (int i = start; i < end; i++) range[i - start] = i;/*from ww w. j av a 2s .c o m*/ return range; } }