Using isEmpty from String class : XML Registry « XML « Java






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

        








Related examples in the same category

1.Finds and deletes the organization that the JAXRPublish program created
2.JAXR Delete Concept
3.Searches a registry for information about organizations whose names contain a user-supplied string
4.Find and deletes the classification scheme that the JAXRSaveClassificationScheme program created
5.Obtain all the registry objects owned by the user and displays their keys, names, and descriptions
6.Create an organization and publishes it to a registry
7.Create a concept and publishes it to a registry
8.Create an organization and publishes it to a registry.( The organization has a service binding that includes a WSDL file.)
9.JAXR Publish Postal
10.It searches a registry for information about organizations using an NAICS classification
11.Search a registry for organizations that offer services based on technical specifications that take the form of WSDL documents
12.Display the postal addresses for the contacts of the organizations using the user-supplied postal address classification scheme UUID
13.Creates a classification scheme and publishes it to a registry