static int printSmallest ( int a [ ] ) {
  int sum , sum1 ;
  Arrays . sort ( a ) ;
  int i , j , k , num ;
  for ( i = 0 ;
  i < 3 ;
  i ++ ) {
    if ( a [ i ] % 3 == 0 ) {
      return a [ i ] ;
    }
  }
  for ( i = 0 ;
  i < 3 ;
  i ++ ) {
    for ( j = 0 ;
    j < 3 ;
    j ++ ) {
      num = ( a [ i ] * 10 ) + a [ j ] ;
      if ( num % 3 == 0 ) {
        return num ;
      }
    }
  }
  return a [ 0 ] * 100 + a [ 0 ] * 10 + a [ 0 ] ;
}

static int printSmallest ( int a [ ] ) { int sum , sum1 ; Arrays . sort ( a ) ; int i , j , k , num ; for ( i = 0 ; i < 3 ; i ++ ) { if ( a [ i ] % 3 == 0 ) { return a [ i ] ; } } for ( i = 0 ; i < 3 ; i ++ ) { for ( j = 0 ; j < 3 ; j ++ ) { num = ( a [ i ] * 10 ) + a [ j ] ; if ( num % 3 == 0 ) { return num ; } } } return a [ 0 ] * 100 + a [ 0 ] * 10 + a [ 0 ] ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier) dimensions: (dimensions))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier))) (for_statement init: (assignment_expression left: (identifier) right: (decimal_integer_literal)) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (return_statement (array_access array: (identifier) index: (identifier))))))) (for_statement init: (assignment_expression left: (identifier) right: (decimal_integer_literal)) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (for_statement init: (assignment_expression left: (identifier) right: (decimal_integer_literal)) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))) right: (array_access array: (identifier) index: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (block (return_statement (identifier)))))))) (return_statement (binary_expression left: (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (decimal_integer_literal)) right: (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (decimal_integer_literal))) right: (array_access array: (identifier) index: (decimal_integer_literal))))))