static Vector < Integer > generatePalindromes ( int N ) {
  Vector < Integer > palindromes = new Vector < > ( ) ;
  int number ;
  for ( int j = 0 ;
  j < 2 ;
  j ++ ) {
    int i = 1 ;
    while ( ( number = createPalindrome ( i ++ , j ) ) <= N ) {
      palindromes . add ( number ) ;
    }
  }
  return palindromes ;
}

static Vector < Integer > generatePalindromes ( int N ) { Vector < Integer > palindromes = new Vector < > ( ) ; int number ; for ( int j = 0 ; j < 2 ; j ++ ) { int i = 1 ; while ( ( number = createPalindrome ( i ++ , j ) ) <= N ) { palindromes . add ( number ) ; } } return palindromes ; }
(method_declaration (modifiers) type: (generic_type (type_identifier) (type_arguments (type_identifier))) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (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)) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (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: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (assignment_expression left: (identifier) right: (method_invocation name: (identifier) arguments: (argument_list (update_expression (identifier)) (identifier))))) right: (identifier))) body: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))))))) (return_statement (identifier))))