Thanks to visit codestin.com Credit goes to www.java2s.com
Using isEmpty from String class
public class StringDemo { public static void main(String[] args) { String myString = ""; if (myString.isEmpty()) { System.out.println("Empty"); } else { System.out.println("Not empty"); } } } //Empty