Java Number Range Create range(int begin, int end)

Here you can find the source of range(int begin, int end)

Description

range

License

Open Source License

Declaration

public static int[] range(int begin, int end) 

Method Source Code

//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;
    }
}

Related

  1. range(double[] data, int to, int stride, int numElementsEachStride)
  2. range(double[] min, double[] max, double[] min2, double[] max2)
  3. range(double[] vals)
  4. range(final int max)
  5. range(float number, float value, float range)
  6. range(int end)
  7. range(int excludedEnd)
  8. range(int from, int to)
  9. range(int from, int to)