public class NumberUtilities { public static String getRange(int stop) { String result = ""; for (int i = 0; i < stop; i++) { result += i; } return result; } public static String getRange(int start, int stop) { String result = ""; for (int i = start; i < stop; i++) { result += i; } return result; } public static String getRange(int start, int stop, int step) { String result = ""; for (int i = start; i < stop; i += step) { result += i; } return result; } public static String getEvenNumbers(int start, int stop) { String result = ""; if ((start % 2) != 0) start += 1; for (int i = start; i < stop; i += 2) { result += i; } return result; } public static String getOddNumbers(int start, int stop) { String result = ""; if ((start % 2) == 0) start += 1; for (int i = start; i < stop; i += 2) { result += i; } return result; } public static String getExponentiations(int start, int stop, int exponent) { String result = ""; for (int i = start; i <= stop; i++) { result += (int)Math.pow(i, exponent); } return result; } }