public static int[] factorsOf(int number) {
		if (number < 0) {
			throw new IllegalArgumentException("Error: int cannot be < 0!");
		}

		int half = Math.round(number / 2);
		ArrayList<Integer> factorsList = new ArrayList<Integer>();
		for (int j = 1; j <= half; j++) {
			if (number % j == 0) {
				factorsList.add(j);
			}
		}
		factorsList.add(number);
		int[] factors = new int[factorsList.size()];
		for (int k = 0; k < factorsList.size(); k++)
			factors[k] = factorsList.get(k);
		return factors;
	}