Hi ,

I have a string defined, say

String message = "hi there";

I want to replace all the e's with i's,

I can either use message.replace('e','i') or traverse using a for loop and replace all e's with i's.

Can someone tell me the internal working of replace () so that i can understand which is more efficient ??

Thanks a lot