Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * Creates an integer range 0,1,2,...,n-1.
     *
     * @param n the length of the range
     * @return the range
     */
    public static Integer[] createIntegerRange(final int n) {
        final Integer[] range = new Integer[n];
        for (int i = 0; i < n; i++) {
            range[i] = Integer.valueOf(i);
        }
        return range;
    }
}