question: private boolean endsWithSpace ( String str ) { return str . length ( ) != 0 && str . charAt ( str . length ( ) - 1 ) == ' ' ; }
target:  Checks if the string ends with a space character, false if the string is empty or ends with a non-space character