BulldogLowell:
char array may be better, but if you want to understand String class look at it this wayadding a string constant to a string constant is not allowed...
myString = "this string" + "that string"; //nope
you have to add your string constant to a string:
void setup()
{
String myString;
myString = myString + "foo";
myString += "bar";
Serial.print(myString);
}
Ok so the concatenation is happening before the assignment and not during it.