How to convert an array to comma separated string in java
Read this post on malliktalksjava.wordpress.com