Java String isEmpty
public class
JavaStringIsEmptyExample
{
public static void
main(String args[])
{
String str1 =
"";
String str2 = null;
String str3 =
"Hello World";
System.out.println("Is
String 1 empty? :" + str1.isEmpty()); System.out.println("Is String 3
empty? :" + str3.isEmpty());
}
}
No comments:
Post a Comment