static void powerSet ( String str , int index , String curr ) {
  int n = str . length ( ) ;
  if ( index == n ) {
    System . out . println ( curr ) ;
    return ;
  }
  powerSet ( str , index + 1 , curr + str . charAt ( index ) ) ;
  powerSet ( str , index + 1 , curr ) ;
}

static void powerSet ( String str , int index , String curr ) { int n = str . length ( ) ; if ( index == n ) { System . out . println ( curr ) ; return ; } powerSet ( str , index + 1 , curr + str . charAt ( index ) ) ; powerSet ( str , index + 1 , curr ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (type_identifier) 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)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier)))) (return_statement))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)) (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier))))))