java tutorial - Java Strings replace() method - java programming - learn java - java basics - java for beginners
Learn Java - Java tutorial - Java strings replace - Java examples - Java programs
Description
The replace() method — returns In Java a new line, as a result, replacing all occurrences of oldChar, in this line, with newChar, in other words - the method allows to replace the character in the string.
Syntax
Syntax method:
Options
Detailed information about the parameters:
- oldChar is an old character;
- newChar is the new character.
Return value
- In Java, replace () returns a string that is derived from this string, replacing all occurrences of oldChar with newChar.