Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

replace all occurrences of a character in a string java

String phrase = "An_Apple_A_Day_Keeps_The_Doctor_Away";
System.out.println(phrase.replaceAll("_", " ");
// prints 'An Apple A Day Keeps The Doctor Away'
 
PREVIOUS NEXT
Tagged: #replace #occurrences #character #string #java
ADD COMMENT
Topic
Name
1+3 =