or: String word = aWord + ' ';
My question is what is the benefit of using a char space. I would guess it has to do with char being a primitive type variable and String a reference variable? therefore using more memory? and if the program is going to use the concatenated word multiple times this makes a difference?
any insight on this is appreciated,
If only one operand expression is of type String, then string conversion is performed on the other operand to produce a string at run time...
A value x of primitive type T is first converted to a reference value as if by giving it as an argument to an appropriate class instance creation expression:
... If T is char, then use new Character(x)...
This reference value is then converted to type String by string conversion.