Java tutorial
//package com.java2s; public class Main { private static final String JOIN_STRING = "~~"; /** * Given a code and description, join the items together using the join string * @param code * @param description * @return */ public static String createCombinedKey(String code, String description) { if (code == null || code.trim().equals("")) { return null; } StringBuffer buffy = new StringBuffer(); buffy.append(code); buffy.append(JOIN_STRING); buffy.append(description); return buffy.toString(); } }