Java tutorial
//package com.java2s; public class Main { /** * Tests if the given string is not null and contains at least one character that is not a space. * @param testString - the string to test * @return false if string is null or contains only spaces, true otherwise */ public static boolean isStringValue(String testString) { return (testString != null && testString.replace(" ", "").length() > 0); } }