"" is empty string and it will not adding anything to your final word object.
if it is not adding anything why there is ""?
The ‘+’ operator in java is overloaded as a String concatenator. Anything added to a String object using the ‘+’ operator becomes a String. Since c1 and c2 are char types, once you summed up them with '+' the result will be the addition of char codes of values in the two variable (ex. 'a' + 'b' produces 195). You can convert these chars to strings by start concatenation with empty string.
""+'a'
is equal to
"a"
.
and then
"a"+'b'
is equal to
"ab"
.
This is applicable to any numeric data type.
for example: below will give error: incompatible types
String x = 5+7;
but
String x = ""+ 5+7;
read:
Is concatenating with an empty string to do a string conversion really that bad?[
^]