So my Eclipse works fine, it compiles everything I need. Now I just wrote code but it's not running it, it just doesn't do anything. I've tested Eclipse with other code and it works fine, so there is something wrong with my code, but I'm not sure what.
I am trying to complete Project Euler's 4th challenge:
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's my code:
package me.practice;
public class Main{
public static void main(String[] args)
{
int palindrome = 0;
for(int i = 0; i < 900; i++)
{
int num = (100 + i) * 999;
String numString = Integer.toString(num);
String numString_reverse = new StringBuilder(numString).reverse().toString();
if(numString == numString_reverse)
{
palindrome = Integer.parseInt(numString);
System.out.println(palindrome);
break;
}
}
}
}
Edit: I've also tried to run it on Netbeans and it doesn't work, so Eclipse is fine.