private static boolean isPrime ( long n ) {
  int end = ( int ) Library . sqrt ( n ) ;
  for ( int p : primes ) {
    if ( p > end ) break ;
    if ( n != p && n % p == 0 ) return false ;
  }
  return true ;
}

private static boolean isPrime ( long n ) { int end = ( int ) Library . sqrt ( n ) ; for ( int p : primes ) { if ( p > end ) break ; if ( n != p && n % p == 0 ) return false ; } return true ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (cast_expression type: (integral_type) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (identifier) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (break_statement)) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)))) consequence: (return_statement (false))))) (return_statement (true))))