Android examples for java.lang:String Null or Empty
Does string contain White Space
public class Main{ public static boolean containsWhiteSpace(final String testCode) { if (testCode != null) { for (int i = 0; i < testCode.length(); i++) { if (Character.isWhitespace(testCode.charAt(i))) { return true; }//w w w . jav a 2 s . co m } } return false; } }