title: In java, how would I find the nth Fibonacci number?
body: <p>Determining the Fibonacci sequence is easy enough to figure out:</p>
  
  <pre><code>int num = 0;
  int num2 = 1;
  int loop;
  int fibonacci;
  System.out.print(num2);
  for (loop = 1; loop &lt;= 10; loop ++)
  {
      fibonacci = num + num2;
      num = num2;
      num2 = fibonacci;
      System.out.print(" " + fibonacci);
  }
  </code></pre>
  
  <p>My problem lies with trying to pinpoint the value for a specified <em>N.</em> As in, If I want to find the 6th element in the sequence, which is 8, how would I find that number, and only that number?</p>