StringBuilder sb = new StringBuilder();
Long[] array = {new Long("1"), new Long("2"), new Long("3")}; for (int i = 0; i < array.length(); i++) { if (i > 0) { sb.append(", "); } sb.append(array[i]); } System.out.println(sb.toString()); //output: 1, 2, 3
No comments:
Post a Comment