i m using servo but when i changed its position from 180 to 90 it firs come above the 90 like 100 degree and then came back to 90. thankx in advance
That a function of the electronics inside the servo, there is nothing you can do about it.
The below person has the same problem, maybe he can help you.
Its undershoot, not overshoot!
Ah, yes that's plausible - I tend to trust numbers more than words though.
Back to the point, adapting the sweep example for a servo but increasing the speed
so that its nearly as fast as a single 90 step command will give better behaviour,
if a bit slower (and less current spiking).
This old thread might be useful (but I've not personally played with the library):
http://forum.arduino.cc/index.php?topic=61586.0