Java tutorial
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { private static final String NEEDED_FORMAT_JS_TAG = "<script src=\"%s\"></script>"; public static String createJsTag(String url) { return String.format(NEEDED_FORMAT_JS_TAG, url); } public static String createJsTag(List<String> urls) { final StringBuilder sb = new StringBuilder(); for (String url : urls) { sb.append(createJsTag(url)); } return sb.toString(); } }