title: Finding largest prime number out of 600851475143?
body: <p>I'm trying to solve problem 3 from <a href="http://projecteuler.net" rel="nofollow">http://projecteuler.net</a>. However, when I run thing program nothing prints out. 
  What am I doing wrong?
  Problem: What is the largest prime factor of the number 600851475143 ?</p>
  
  <pre><code>public class project_3 
  {
      public boolean prime(long x)   // if x is prime return true
      {
          boolean bool = false;
  
          for(long count=1L; count&lt;x; count++)
          {
              if( x%count==0 )
              {
                  bool = false;
                  break;
              }
              else { bool = true; }
          }
          return bool;
      }
  
      public static void main(String[] args)
      {
          long ultprime = 0L;  // largest prime value
          project_3 object = new project_3();
  
          for(long x=1L; x &lt;= 600851475143L; x++)
          {
              if( object.prime(x)==true )
              {
                  ultprime = ((x&gt;ultprime) ? x : ultprime);
              }
          }
          System.out.println(ultprime);
      }
  }
  </code></pre>