public int largestPalindrome() {
		//create a list of palindromes that are the result of a product of 2 3-digit numbers
		ArrayList<Integer> palindromes = new ArrayList<Integer>();
		int largestPalindrome = 0;
		int theNumber = 0;
		
		for (int first = 999; first > 99; first--) {
			for (int second = 999; second > 99; second--) {
				theNumber = first * second;
				if (isPalindrome(theNumber)) {
					palindromes.add(theNumber);
				}
			}
		}
		// find the largest palindrome in the list
		for (int each : palindromes) {
			if (largestPalindrome == 0) {
				largestPalindrome = each;
			}
			else {
				if (each > largestPalindrome) {
					largestPalindrome = each;
				}
			}
		}
		
		return largestPalindrome;
	}