Here you can find the source of range(final int max)
Parameter | Description |
---|---|
max | the size of the array. |
public static int[] range(final int max)
//package com.java2s; //License from project: Apache License public class Main { /**//ww w . j av a 2 s .c o m * Helper function that generates an array of the numbers 0..max-1. * * @param max the size of the array. * @return an array of the numbers 0..max-1. */ public static int[] range(final int max) { int[] ret = new int[max]; for (int i = 0; i < max; ++i) { ret[i] = i; } return ret; } }