Java Millis to nanoseconds
<p>I have just started to learn Java, and I want to make random array and to measure time. I used <code>System.currentTimeMillis();</code> at the beginning of filling my array, and the same at then and. Then I wanted to convert milliseconds to nanoseconds and used <code>long total=TimeUnit.MILLISECONDS.toNanos(time1);</code> but trouble occurred:</p>

<pre><code>import java.util.*;
import java.util.concurrent.TimeUnit;

public class main {
public static void main(String[] args) {

long time1,time2,time3;
int [] array =  new int[10];
Random rand =new Random(100);
time1=System.currentTimeMillis();
for(int i=0;i&lt;array.length;i++){
array[i]=rand.nextInt(100);
}
time2=System.currentTimeMillis()-time1;

    long total=TimeUnit.MILLISECONDS.toNanos(time1);
    System.out.println("Time is:"+time1
    );

}

}
</code></pre>

<p>In the end I got 'Time is:1361703051169;' I think that something's wrong with this.</p>
