Primes { public static boolean isPrimeFast(int n) { int m = (int) Math.sqrt(n); for (int i = 2; i < m; i++) { if (n % i == 0) { return false; } } return true; }  static boolean isPrime(int n); static boolean isPrimeFast(int n); static boolean isPrimeWhile(int n); static boolean isPrime(long n);  }
@Test public void testPrime() { Assert.assertTrue(Primes.isPrimeFast(Integer.MAX_VALUE)); }