static int printNearest ( int N ) {
  int MAX = ( int ) 1e6 ;
  int [ ] isprime = new int [ MAX ] ;
  for ( int i = 2 ;
  i < MAX ;
  i ++ ) isprime [ i ] = 1 ;
  Vector < Integer > prime = new Vector < Integer > ( ) ;
  int i = 0 ;
  prime_seive ( MAX , isprime , prime ) ;
  while ( isprime [ N ] == 0 ) {
    N += prime . get ( i ) ;
    i += 1 ;
  }
  return N ;
}

static int printNearest ( int N ) { int MAX = ( int ) 1e6 ; int [ ] isprime = new int [ MAX ] ; for ( int i = 2 ; i < MAX ; i ++ ) isprime [ i ] = 1 ; Vector < Integer > prime = new Vector < Integer > ( ) ; int i = 0 ; prime_seive ( MAX , isprime , prime ) ; while ( isprime [ N ] == 0 ) { N += prime . get ( i ) ; i += 1 ; } return N ; }
(method_declaration (modifiers) type: (integral_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: (decimal_floating_point_literal)))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal)))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (type_identifier))) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (while_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))) body: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))) (return_statement (identifier))))