Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String join(List arr, String separator) {
- if (arr == null || arr.size() == 0)
- return "";
- String out = arr.get(0).toString();
- for (int i = 1; i < arr.size(); i++)
- out += separator + arr.get(i);
- return out;
- }
Add Comment
Please, Sign In to add comment