Java tutorial
//package com.java2s; public class Main { public static String getAttAsString(String name, String val) { StringBuffer sb = new StringBuffer(); sb.append(" " + name + "=\"" + val + "\""); return sb.toString(); } }