Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    public static int[] range(int from, int to) {
        if (to < from)
            throw new IllegalArgumentException("to must be larger than from");
        int[] out = new int[to - from];
        for (int i = 0; i < out.length; i++)
            out[i] = from + i;
        return out;
    }
}