Carey Brown wrote:Daniel, a few posts back you eliminated the formattedNames array and suggested modifying the array that is passed in. Depending on how picky the instructor is, this does not meet the requirements. Also, a method like the one you suggest should return void to make it painfully obvious to anyone calling the method that it modifies the data in place. Again, "void" does not meet the requirements.
Carey Brown wrote:As DD mentioned, you are comparing to a string containing a single space, not an empty string. This is the recommended approach because its intent is clear and the risk of typos is non-existent (meaning any typos would be caught by the compiler).