What is difference between replace and replaceAll in Java?

The difference between replace() and replaceAll() method is that the replace() method replaces all the occurrences of old char with new char while replaceAll() method replaces all the occurrences of old string with the new string .

Sizin İçin Seçtik  What do the Replace all do?

Leave a Reply

Your email address will not be published. Required fields are marked *