How can I convert int[] to comma-separated String in Java?
int[] intArray = {234, 808, 342};
Result I want:
\"
int[] intArray = {234, 808, 342, 564};
String s = Arrays.toString(intArray);
s = s.substring(1,s.length()-1);
This should work. basic idea is to get sub string from Arrays.toString() excluding first and last character
If want quotation in result, replace last line with:
s = "\"" + s.substring(1,s.length()-1) + "\"";