Convert Resultset to String array

前端 未结 5 949
死守一世寂寞
死守一世寂寞 2021-01-05 03:16

I need to Convert My result set to an array of Strings. I am reading Email addresses from the database and I need to be able to send them like:

message.addRe         


        
5条回答
  •  旧巷少年郎
    2021-01-05 03:59

    If i understand correctly You want to see the output in one line with comma as a separator. Then instead of

    System.out.println(arr[i]);
    

    Try

    System.out.print(arr[i]+",");
    

    and remove last comma somehow.

提交回复
热议问题