public static boolean isPrime ( int a ) {
  if ( a < 4 ) {
    if ( a == 2 || a == 3 ) {
      return true ;
    }
    else {
      return false ;
    }
  }
  else {
    for ( int j = 2 ;
    j * j <= a ;
    j ++ ) {
      if ( a % j == 0 ) {
        return false ;
      }
      if ( a % j != 0 && ( j + 1 ) * ( j + 1 ) > a ) {
        return true ;
      }
    }
    return true ;
  }
}

public static boolean isPrime ( int a ) { if ( a < 4 ) { if ( a == 2 || a == 3 ) { return true ; } else { return false ; } } else { for ( int j = 2 ; j * j <= a ; j ++ ) { if ( a % j == 0 ) { return false ; } if ( a % j != 0 && ( j + 1 ) * ( j + 1 ) > a ) { return true ; } } return true ; } }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (block (return_statement (true))) alternative: (block (return_statement (false))))) alternative: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) consequence: (block (return_statement (false)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)) right: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (identifier)))) consequence: (block (return_statement (true)))))) (return_statement (true))))))