Here you can find the source of CreateIntegerSequenceList(int startNumber, int endNumber)
Parameter | Description |
---|---|
startNumber | Start number |
endNumber | End number |
public static ArrayList<Integer> CreateIntegerSequenceList(int startNumber, int endNumber)
//package com.java2s; // it under the terms of the GNU General Public License as published by import java.util.*; public class Main { /** Creates a list of integers starting at one value and ending at another value (increment step is one). */*from ww w . j a v a 2 s . co m*/ * @param startNumber Start number * @param endNumber End number * @return List of Integer values */ public static ArrayList<Integer> CreateIntegerSequenceList(int startNumber, int endNumber) { ArrayList<Integer> list = new ArrayList<Integer>(); for (int i = startNumber; i <= endNumber; i++) list.add(i); return list; } }