codice:
ArrayList arrayList = new ArrayList();
while (rsQuery.next()) {
  arrayList.add(rsQuery.getString(1));
}
String[] items = (String[])arrayList.toArray();
for (int i=0; i<items.length; i++)
  System.out.print(items[i]);