Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static String[] range(char start, char end) {
        if (start >= end)
            throw new IllegalArgumentException("Start >= end");

        String[] charsRange = new String[end - start + 1];

        int idx = 0;
        for (char value = start; value <= end; value++) {
            charsRange[idx++] = value + "";
        }

        return charsRange;
    }
}