Here you can find the source of mergeString(String currentValue, String newValue)
public static String mergeString(String currentValue, String newValue)
//package com.java2s; //License from project: Open Source License public class Main { public static String mergeString(String currentValue, String newValue) { if (currentValue == null || currentValue.length() == 0) return newValue; if (newValue == null || newValue.length() == 0) return currentValue; if (newValue.length() > currentValue.length()) return newValue; return currentValue; }//from w ww . j a v a2 s .c o m }