int numberOfSpaces() {
        String string = toString();
        int length = string.length();
        int numberOfSpaces = 0;
        for (int i = 0; i < length; i++) {
            if (string.charAt(i) == ' ') {
                numberOfSpaces++;
            }
        }
        return numberOfSpaces;
    }
int numberOfSpaces ( ) { String string = toString ( ) ; int length = string . length ( ) ; int numberOfSpaces = 0 ; for ( int i = 0 ; i < length ; i ++ ) { if ( string . charAt ( i ) == ' ' ) { numberOfSpaces ++ ; } } return numberOfSpaces ; }
Returns the number of space-characters in this line.

@return	a value