Java Array Create arrayConstructor(int len)

Here you can find the source of arrayConstructor(int len)

Description

array Constructor

License

Open Source License

Declaration

public static int[] arrayConstructor(int len) 

Method Source Code

//package com.java2s;

public class Main {
    public static int[] arrayConstructor(int len) {
        int[] A = new int[len];
        for (int i = 0; i < len; i++) {
            A[i] = i;/*  w w w  . j  a  v  a  2s  .  c  om*/
        }
        return A;
    }
}

Related

  1. array(T... elements)
  2. array(T... elems)
  3. array(T... ts)
  4. array(T... values)
  5. array(T... values)
  6. arrayOf(int... values)
  7. arrayOf(long... values)
  8. arrayOf(T... elements)
  9. arrayOf(T... objects)