Java tutorial
//package com.java2s; import android.util.Log; public class Main { public static String TAG = "System.out"; public static String NameDefaultValue(String srcStr, String defaultValue) { Log.d(TAG, "-------------NameDefaultValue----------" + srcStr + "//////---" + defaultValue); return (srcStr == null || "".equals(srcStr)) ? defaultValue : srcStr; } }