Is there any performance difference between the for loops on a primitive array?
Assume:
double[] doubleArray = new double[300000]; for (double var: do
Why not measure it yourself?
This sounds a bit harsh, but this kind of questions are very easy to verify yourself.
Just create the array and execute each loop 1000 or more times, and measure the amount of time. Repeat several times to eliminate glitches.