if you did not insert the " ", your output would be:
my name is Davidmohan.
As you inserted the space, you will have:
my name is David mohan.
Actually you could have set your first string to "David ", so the output would already have the "space", or you could also set the second string to " mohan", which would give you the same result.
Hope it helped.
The " " in between actually creates a new string without creating a new variable, which helps to save memory. The + sign between the variable and the string actually serves the purpose of concatenating the tow strings