Java examples for java.lang:String Null Or Empty
is String Empty Or Null
public class Main{ public static void main(String[] argv){ String str = "java2s.com"; System.out.println(isEmptyOrNull(str)); }/* ww w.j av a2s .co m*/ public static boolean isEmptyOrNull(String str) { return str == null || str.isEmpty(); } }