Java Number Range Create range(int n)

Here you can find the source of range(int n)

Description

range

License

BSD License

Declaration

public static int[] range(int n) 

Method Source Code

//package com.java2s;
//License from project: BSD License 

public class Main {
    public static int[] range(int n) {
        int[] result = new int[n];
        for (int i = 0; i < n; i++) {
            result[i] = i;//from   ww w.jav  a 2s .c  om
        }
        return result;
    }
}

Related

  1. Range(int k, int from, int end)
  2. range(int low, int high)
  3. range(int min, int max)
  4. range(int min, int max)
  5. range(int min, int max, int value)
  6. range(int start, int end)
  7. range(int start, int end)
  8. range(int start, int end)
  9. range(int start, int end)