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  How do you make a string in Java?

Leave a Reply

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