Я полагаю, что простой toString()
в основном справится с задачей:
String values[] = {"23","343","33","55","43"};
String inClause = values.toString();
//at this point inClause will look like "[23,343,33,55,43]"
//replace the brackets with parentheses
inClause = inClause.replace("[","(");
inClause = inClause.replace("]",")");
//now inClause will look like "(23,343,33,55,43)" so use it to construct your SELECT
String select = "select * from table_name where id in " + inClause;