I can not tell you with a small example. You have to use Google, like the rest of us.now i understand.what it is.but what is Serial.flush()
they just gave simple definition of the function in arduino serial library
could you say it with small example