I have written a code for the fourth question of Euler Project.

The question is:
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.

Find the largest palindrome made from the product of two 3-digit numbers.

Here is my code:

```
public class LargestPalindromeProduct {
private static int product;//integer palindrome number
private static String palindrome;//string palindrome

private static int largestPalindrome(){
    for(int i = 100; i<=999; i++){
        for(int k = 100; k<=999; k++){
            product = i*k;

            palindrome  = Integer.toString(product);

            for(int j = 0; j<= palindrome.length()-1; j++){
                if(palindrome.charAt(j) == palindrome.length() - 1 - j){
                    return product;
                }
            }
        }
    }
    return product;
}
public static void main(String[] args) {
    int largestPalindrome = largestPalindrome();
    System.out.println(largestPalindrome);
}

```

}

This code gives 998001 as the output.
Can you help me to find where the problem is?