public static boolean startWithSpace(String s){
  return s.length() > 0 && Character.isWhitespace(s.charAt(0));
}

public static boolean startWithSpace ( String s ) { return s . length ( ) > 0 && Character . isWhitespace ( s . charAt ( 0 ) ) ; }
check whether the statement starts with a whitespace .
