title: Finding the prime factor of a Long number using Java
body: <pre><code>public class prime
  {
     public static void main(String[] args)
      {
       long thing = 600851475143L;
       for(long i = 300425737571L ; i == 0 ; i-- ){
       if (thing % i == 0)
       {
         long answer = i;
         System.out.println(answer);
         break;
       }
       }
  
      }
  
  }
  </code></pre>
  
  <p>This is the code I currently have, however I have been running it in DrJava for a few minutes and it has returned no results. I'm guessing there are roughly a million ways my code can be optimised though ; would anyone be able to give me some tips ? </p>
  
  <p>Trying to work through a few programming problems today and this one is causing me some trouble. </p>
  
  <p>Thanks a lot :)</p>