public static int findGCD ( ArrayList < Integer > arr , int n ) {
  int result = arr . get ( 0 ) ;
  for ( int i = 1 ;
  i < n ;
  i ++ ) result = gcd ( arr . get ( i ) , result ) ;
  return result ;
}

public static int findGCD ( ArrayList < Integer > arr , int n ) { int result = arr . get ( 0 ) ; for ( int i = 1 ; i < n ; i ++ ) result = gcd ( arr . get ( i ) , result ) ; return result ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (generic_type (type_identifier) (type_arguments (type_identifier))) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (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: (identifier) right: (method_invocation name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) (identifier)))))) (return_statement (identifier))))