0

I'm having trouble understanding the output generated by the code below.

The code segment:

        long startTime= System.nanoTime();
        //method that I am measuring.
        long endTime = System.nanoTime();
        long elapsedTime = endTime - startTime;
        double seconds = (double)elapsedTime / 1_000_000_000.0;

        System.out.println(seconds+"secs");

One of the outputs that I got:

 1.397E-4 secs

1 Answers1

1

1.397E-4 is the same as 0.0001397

arcadeblast77
  • 560
  • 2
  • 12