Java examples for java.lang:String Null Or Empty
is String Empty
public class Main{ public static void main(String[] argv){ String string = "java2s.com"; System.out.println(isEmpty(string)); }// w w w . j a va 2 s. c o m public static boolean isEmpty(String string) { return string == null || string.trim().length() == 0; } }