title: how correctly display nanotime to second conversion
body: <p>I have a BFS algorithm to solve the 8-Puzzle, and one of the project requirements is to output the amount of time it takes to find the shallowest solution.</p>
  
  <p>I am using <code>System.nanoTime()</code> to keep track of the applications run time because it solves the majority of the given puzzles in well under a second.</p>
  
  <p>The problem i am having is whem i convert my <code>nanoTime</code> to seconds, it displays in a weird format.</p>
  
  <p>the following code is used:</p>
  
  <pre><code>final long startTime = System.nanoTime();
  
  //algorithm code removed for simplicity this all functions correctly
  
  
  final long duration = System.nanoTime() - startTime;
  final double seconds = ((double)duration / 1000000000);
  System.out.println("Nano time total: " + duration);
  System.out.println("solution Time : " + seconds + " Seconds");
  </code></pre>
  
  <p>This produces the output:</p>
  
  <pre><code> Nano time total: 916110
   solution time : 9.1611E-4 Seconds 
  </code></pre>
  
  <p>I have also tried using floats to represent the values.</p>
  
  <p>is anybody able to provide a better way to convert/display, maybe use a format output statement?</p>
  
  <p>Thanks for taking the time to read my question.</p>