<ul data-eligibleForWebStory="true">In Java, checking if a String is both not null and not empty can be tricky for beginners as null and empty are different concepts.A String reference variable is null if not initialized, and an empty String has zero characters.Whitespace may not be considered an empty String in all cases, depending on the situation.There are correct ways to test if a String is not null and not empty in Java.The article covers these techniques.Title: Java, Unix, Tibco RV and FIX Protocol Tutorial.