question: public static String formatSqlValues ( String ... values ) { StringBuilder builder = new StringBuilder ( "(" ) ; for ( int i = 0 ; i < values . length ; i ++ ) { if ( i > 0 ) { builder . append ( ',' ) ; } builder . append ( '\'' ) ; builder . append ( escapeSqlString ( values [ i ] ) ) ; builder . append ( '\'' ) ; } builder . append ( ")" ) ; return builder . toString ( ) ; }
target:  Formats an array of values as a SQL VALUES like ('value1','value2',...,'value_n'). Escapes single quotes with two single quotes.