Java tutorial
//package com.java2s; public class Main { static String createInSQL(int length) { StringBuilder builder = new StringBuilder(); for (int i = 0; i < length;) { builder.append("?"); if (++i < length) { builder.append(","); } } return builder.toString(); } }