Java tutorial
//package com.java2s; import java.util.List; public class Main { public static String getTags(List<String> tags, String block) { int tagSize = tags.size(); StringBuilder result = new StringBuilder(); for (int i = 0; i < tagSize; i++) { result.append(tags.get(i) + block); } result.deleteCharAt(result.lastIndexOf(block)); return result.toString(); } }