/** * Test 1 utility class that provides fields and methods for working with * strings. * */ public class TestC { /** * The empty string "" */ public static final String EMPTY = ""; /** * The string equal to a single space " " */ public static final String SPACE = " "; /** * Checks if a string s contains at least one space. Returns false if the * string s is null. * * @param s * a string to check * @return true if s contains TestC.SPACE, false otherwise */ public static boolean containsSpace(String s) { if (s == null) { return false; } return s.contains(TestC.SPACE); } private TestC() { } }