public static String generateAssignmentFields(String[] fields,String separator){
  String[] fieldAssignment=new String[fields.length];
  for (int i=0; i < fields.length; i++) {
    fieldAssignment[i]="`" + fields[i] + "`=?";
  }
  return String.join(separator,fieldAssignment);
}

public static String generateAssignmentFields ( String [ ] fields , String separator ) { String [ ] fieldAssignment = new String [ fields . length ] ; for ( int i = 0 ; i < fields . length ; i ++ ) { fieldAssignment [ i ] = "`" + fields [ i ] + "`=?" ; } return String . join ( separator , fieldAssignment ) ; }
generate assignment fields string : ` a ` = ? , ` b ` = ? or ` a ` = ? and ` b ` = ?
