private String appendCommaText(String result,String append,boolean addComma){
  if (result != null && !result.isEmpty()) {
    if (append != null && !append.isEmpty()) {
      if (addComma)       result+=getString(R.string.format_comma_prefix,append);
 else       result+=getString(R.string.format_space_prefix,append);
    }
    return result;
  }
 else {
    return append;
  }
}

private String appendCommaText ( String result , String append , boolean addComma ) { if ( result != null && ! result . isEmpty ( ) ) { if ( append != null && ! append . isEmpty ( ) ) { if ( addComma ) result += getString ( R . string . format_comma_prefix , append ) ; else result += getString ( R . string . format_space_prefix , append ) ; } return result ; } else { return append ; } }
the method combines two strings . as the string separator is used space or comma .
