Java tutorial
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { public static List<String> GetNumbersList(int from, int to) { if (from > to) { return null; } List<String> numberList = new ArrayList<String>(); for (int i = from; i <= to; i++) { numberList.add(Integer.toString(i)); } return numberList; } }