public static void algorithmOne(int n){
long startTime = System.currentTimeMillis();
search:
for (int possiblePrime = 2; possiblePrime <= n; possiblePrime++){
for (int divisor = 2; divisor < possiblePrime; divisor++)
if ( possiblePrime%divisor == 0 && possiblePrime != divisor )
continue search;
System.out.println(possiblePrime);
}
long endTime = System.currentTimeMillis();
System.err.println(endTime - startTime);
}
これは素数を見つける方法ですが、「System.err.println(endTime - startTime);」に到達しない理由がわかりません。ライン。