how to replace in java

Solutions on MaxInterview for how to replace in java by the best coders in the world

showing results for - "how to replace in java"
Liam
30 Oct 2018
1public static void main(String args[]){  
2String s1="my name is khan my name is java";  
3String replaceString=s1.replace("is","was");//replaces all occurrences of "is" to "was"  
4System.out.println(replaceString);  
5}}  
6
Oskar
04 Aug 2020
1String s1 = "my name is khan and my name is java";
2String replaceString = s1.replace("is","was");
3//replaces all occurrences of "is" to "was"
4System.out.println(replaceString);
Clare
10 Feb 2020
1public static void main(String args[]){  
2String s1="my name is khan my name is java";  
3String replaceString=s1.replace("is","was");//replaces all occurrences of "is" to "was"  
4System.out.println(replaceString);  
5}}  
queries leading to this page
string replace value javareplace method of string in javareplace chacter in string javahow to replace a char in a string javreplace in a string javahow to replace 5c 22 with 22 in javareplace a substring in a string in javareplace and 22 28 22 in javamethod string to replace javareplace string method in javareplace in string in jva areplace matched text javareplace char in strinc replace javajava streing replacereplacement in java stringstring replace in javajava string replace 22how to replace a char in a string javastring replace 28char 2c char 29replace string javafunction of replace string in java 5d 5dsubstitute string javajava string replacejava replace texthow to replace 2a in javahow to change the value of a string in javareplace string java withjava how to replace specific string in text gile in javareplaceall in javajava strong replacehow to replace string cords in javareplace string in string array in javajava 2b string replacestring replacment javajava replace functions replace javareplace characters in string javastring replcae javahow to replace a character in a stringjava strig replacereplace a substring java java string replace umlautereplace substring in java stringreplace values with a function javareplace 5c java replace 28 29 javajava string replacestr replace javasreplace characters in javareplace java examplesreplace 5c 22 javajava replace 22 22 in stringmethod to replace a string in javahow to replace with 5c javajava how to substitute a character in a stringhow to replace 5b in javajava string replace using patternstr replace javatext replace 28 22 22 2c 22 2b 22 29 in javareplace and contains javareplace en javajava text replace 28find 2creplace 29replace string injavahow can you change a string value in javahow to change the string method replace replace javareplace with in javahow to replace a character in string in javareplace 22 7d 22 javahow to replace 5c from string in javahow to replace to 3a in javareplace in javahow to change the data inside a string javastring replace javahow to replace a chacter in stringstring replace javashow to replace a string with another string in javastring java method to replacestring replace java replace a substring with another string in javareplace character in a stringstring replace method in javajava replace stringreplace working javastring replace fiunction in javajava 22 replacejava replace methondshow to replace acharacter in a stringreplace char sequence javahow replace works in javahow to replace a particular character in a string in javahow to replace 2c in string in javajava string replace 28 29str replace javareplace a substring in javastring replace 5b in javareplace text javajava string substitute stringchange java stringreplace a string with another stringstring replace functions in javajquery string replacereplace chat in stringreplace method string javareplace certain ccharector with another javajava replace examplejava replace 2c by in stringreplace 5b 5d in javareplace 5c 5c 3a from string javareplace a character in string javareplace string javastring replacejava replace a substringjava string replacereplace javsreplace char in stringjava replace orreplace character in strng javastrring replace function in javareplace character from stringhow to replace char in a string javareplace text in javawhat can i replace 7c 7c in javahow to replace 5c in javaprogramming in java typing letter replaces old letterjava replace charsequencereplace in java stringreplace metod in javahow to use replace method in javastring replace java questionsreplace 2f with 5c in javastr replace in javahow to find and replace in javahwo to change cahracter in text in javastring contains and replace in javajava string replace 28 29 method using loops 5c to str replace in javajava replace 5c with 5c 5creplace 22 5c 22 javajava replace pattern in stringhow to replce 22 with 2f 22 in javareplace 23 from string in javareplace the charcater in a string 27 27 replacing with 2f in javajava built in replace methodsreplace function in bluejreplace strat with string java replacing with 2f in javajava string char replacereplace a char from a stringhow replace method works in javastring replace 25s javafind and replace string in javareplace string value with others javareplace in strings javajaav replace functionreplace 2f 2f in javastring replace some caracters javareplacing character in stringjavareplace 22 22 in string javawhy i can replace 28 22 5c 5c 22 29 in string in javahow to replace a int character in a string in javareplace 28 29 in javahow to replace 3f from string in javareplace certain values in a string javajava str replace stringjava string replace 22 5d 22java replace in placestring replace java that replaces with stringreplace javajava replace stringreplace method in string javajava string replace 5creplace in string in javareplace a string inside a string javareplace 22 javahow to replace specific character from string in javareplace text in string javajava replace string in stringjava string substitutereplace 28 22 2f 22 2c 22 22 29 character in string javahow to replace a substring with a char javajava replaceall stirngreplace characters from the stringsjava replace to stringstring replace jaastring find and replace javahow to use string replace in javahow to replace letters in a string in javahow to replace characters in a string in javahow to replace substrings in javajava string replace charchange a character in string javajava replace replace with 24 in stringjava string replace 5djava replace 25sdoes replaceall create new string in javareplce character in string javajava replace a string with another stringjava replace string valuestr replace javareplace with in javajava replace 28replace letter in javastring replace methodjava string replace on the same stringhow to use replace character in string javajava replace examplestring char replace in javastring replace javareplace 2f to in stringjava replace 5c 60 replace 28 29 in javastring replace in javareplace character in string programreplace certain chars in string javareplace java tutorial how to get the replcce charecter of a string in javccareplace 28 29 string javareplace characters ins tringused replace with a veraible javahow to repalce certain symbols in a string javastring 5b 5d replace in javastring replace 5c java string replace mthod javajava code to replace characters in a stringhow to replace some portion of string in javastring replace java use orhow replace char in stringstring replace char with string replae in javajava string replacereplace in java for stringjava replace onereplace values in string javahow replace 24 in string in javareplace in string javastrng replace javajava change string in a methodjava repalce stringreplace function javahow to replace char in sstringreplace all of a certain ccharector with another java in stringstring replacejavarepalce in javarepace text in javastring replace pattern java 2f replace in java stringreplace method is used in javastring replace substring javastring replacement javareplace method javastring replace characterrepace a letter in string in javastring replace java in poitionreplace string with another string in javajava does string replace copyhow to replace 28 in javahow to do replace with a string in javahow to replace for loops in javause replace 28 29 in javahow to replace a substring in a string in javajava replace word in stringjava replace 27java find relace stringreplace to 2f in javachange character by another javareplace something in the stringwhere can i use replace in javahow to replace on a string javajava replace speaces 40 replace javaexample of replace in javajava find and replace in stringfind in string and replace javareplace a value javause string replace in javajava string replacementstring replace java oncehow to replaca a letter with a letter javareplace string by string javareplace 5e in javahow to rename string class javajava search a string array and replacejava string replacingjava replace c3 b2 with oreplace java 5c 5dhow to replace character from a string in javajava writing replace methodreplace caharcter in string 5cjava replace in stringclass that implement string replacement in javareplace in jaavreplace string with other string javareplace with string javareplace in jaajava string replace 28 29how to replace a word in a string in java using replace methodsubstitute a character in string javajava metod replace string charactershow to replace one character in a string in javareplace string characterreplace method javashow to replace a specific character in a string in javareplace instring javareplace strings javajava string replace a substring string replace java docsreplace method string in javastr replace in javareplace function in java stringreplace megthod in javareplace method for string in javareplace string function in javareplace java strinfreplace 3a from strgin javareplace 28 29 javastring replace character in javastring remplace javahow to replace 2b string javain java replace 22 with 5c 22java replace characters in a stringjava find replace in stringreplace with in javahow to replace some part in string in javajava replace 22 in stringjava method to replace a string in stringhow to replace a string in javahow to replace a character in a string in javajava replcereplace injava i 3dfor stringscharacters replace in javajava replace letter in string with anoter letterjava replace 22 on stringstring replace function in javareplace a string on condition using javajava substring replacehow to replace string characters in javafor replace char in stringwhich language can replace javajava to replace stringhow to replace strings in javahow to replace 22 5c 22 in javareplace symbol in string javajava replace 5b 5djava str replacejava replace helpreplace 2c with 22 22 javahow to replace part of string in javajava does string replace update the valuereplace string jvafind and replace in string java 22 5c 22 to str replace in javajava replace in stringhow to replace a string with another stringjava program to replace each character in a string with it 27s next letterreplace char of a stringreplace a word in javacharacter substitutions javareplacing in stringsjava string replace valuesstring replace java 5cjava replace string contentreplace 5b character in java stringjava replace 22replace 2a from string javajava replace printlnhow to change value of a string in javajava replace characters in stringjava replaceall return typesreplace funtion in javareplace brac javareplace 22 with 5c 22 in a stringhow to use replace in javajava string replace stringreplacing a character in a string javahow to replace letter in string javareplace from to javareplace 7b 7d javajava replace 27 2b 27 in string replace in javareplace full stringwith anther string java string variable replace 2a replace 28 22 5c 22 2c 22 22 29 3b javahow do i replace a method in javajava replace 7b 7dreplace in javahow to replace a value in string in javajava string replace functionstring replace javastring replace 2f with 5c in jaareplace a string in javajava string search and replacereplace 28 22 22 2c 22 22 29 in javahw to replace lettes in string with characters in javajava replace 3fhow to replace substrings in strings javajava string replace importhow to replace part of a string in javareplace string meathod java formatjava replace value of stringhow to replace string with another in javajava builtin replacereplace function in java for stringreplace string with symbolhow to replace the value in javahow to replace char in string in javahow to replace the 2a char in string replace all javadifferent ways to change string in javaeffective way to replace in javareplace string jacajava replacefile with stringrelapce in javareplace strin character javahow to replace string 2b to operator in javajava string replace examplesreplace a char with a stringwhat is replace method in javafind and replace string array javawrite a java program to replace certain characters from string replace characters on stringjavastring replace on replaces sting oncereplace string javajava string replace methodsjava replace substringcode to replace in javareplace a character in a string javahow to replace 22 with 5c 22 in javajava efficient replace stringstr replace 28 29 in javareplace a character in a string in javajava hwo to use string replacealljava string replace string likereplace 22 with 2f 22 javajava string replace substring examplejava find and replace in textreplace chars in javastring java replace stringhow to replace accent from string in javastring replace 28 29 javafind string and replace in javajava replace 26java replace 22 charjava replace stringjava replace characterreplace string in a sentence javareplace method in java stringhow to replace 7b 7d javajava string relplacingchar replacehow to replace 22 7b 7d 22 javajava replace 2creplace a word in string javajava replace 5ejava replace string methodstring 2creplace javafind and replace 5c in javajava string replace methodprogram to replace a substring in a string in javareplace string in string with string javajava replace substring in stringstring replace charreplace characters in stringreplace 5c 22 with 22 in strings javareplace methods in javahow to replace some character in string in javareplace method injacajava replace the 22 5c 22 in a stringstring replace method in javahow replace 22 26 23 in itring in javajava string substitutionreplace in java examplesjava replace whole string string replace javastring replace javcajava replace java code to replace 3e 3doverwrite string javareplace char java replace old string with new string in javastring replace other language in javajava string 7b 7d replacereplace 28 29 is method of string class in javahow to replace 2f in javastring replace javajava loop to replace a stringfind and replace in a string javahow to replace valuve in javahow to use replace 28 29 in javareplace symbol with to get stringhow to replace charater in stringis the replace method of string class statichow to replace javareplace funtion javastring replce in javareplace java stringreplace a charcter in javareplace string in javareplace certain ccharector with another java in stringstring replace function javajava replace 5ejava substring replace examplestr replace in javajava replace part of stringreplace a part of string in javahow to replace something in javareplace 3f in javareplace 3f from string in javajava replace methodreplace method in javahow to perform find and replace in a java stringhow to replace 24 in java 40replace javas replace a given substring in javahow to replace characetrs with others in javareplace a character with a string in javahow to replace with 2f in javafind an element and replace it with another string using javahow to change a particular character in string in javajava string replcewhat java will be replaceto replace javareplace text from string javareplace char java stringstring replace in pjavahow to replace a string in javahwo to replace thigs in strings in javareplace function in javareplace stringjava string replace replacehow to replace characetrs in javareplace fun in javajava replace 7b 7d string java how to replace stringjava replace with stringreplace s in string javahow to replace substring in javareplace char in string java mrthod 5cstring replace method javareplace 28 29 in javafind and replace text in javajava replace 28 29java syntax of replace for stringhow to replace a character of a string in java strin replace 2f 2f with 2f javahow to substitute string javajava string find and replacestring replace javreplace with in string javareplace part of string javareplace 2f 2c in javajava replace 5b 5dusing replace in a string in javareplace character in string javareplace char of string javajava replace 7b 7d string javahow to replace 3a using replace method in javareplace function jaareplace example in string javareplacing things in strings javawhat does replace method do in javastring replace in java 25sjava replace codehow to replace character in string in javahow to use replaceall in javachar replace javareplace 2f with 5c 5c in javareplacing characters in a string javareplace 5c string javareplace string with another string javahow to replace 5c with 5c 5c in java stringreplace a char from a string javareplace in java which packagereplace substring with another string in a stringhow to replace 24 with 5c 24 javareplaceall vs replace in javareplace a letter in string javajava replace 2astring replace 28 29 javareplace 2c in string javahow to replace in string in javajava replace 5cstring java replacereplace values in string in javastring replase in javajava string replace in placefind and replace javapattern replace java stringreplace substring in a string in javahow to change the text in a string javareplace characters in a string javajava replace char in stringmethod replace javareplace a string with another string in javareplacce string in a stringjava replace something from a stringstring replace in java 8java replace 2f with 5creplace 22 29 22 javareplace a char in stringeasy way to replace a part of a string with a char in javareplace 5c 22 with 22 in javahow to replace 5c 3b in javajava substring remplacereplace java methodstring replace character javareplace string javastringstring replace example javahow to replace 27 5c 27in stringjava replaceallfind and replace java methodreplace something in string javareplacing in string javareplace in string jfind and replace in java string programjava string how to replace a characterreplace javashow to replace char in string javareplace 28 29 in javareplace character in string in javareplace char in stirng injvajava replace value in a stringreplace funtion in java for stringchar replace in stringhow does the replace function work in javareplace current string with new in javajava string replace a charreplace string in javahow to replace a set of char in a string in javareplace 22 22 javareplace a character from a stringreplace a char in a stringstring replace 22 in javareplace in a stringjava replace methodjava how to replace a character in a stringjava replace parts of string with stringhow to replace 22 in a string javahow to replace 22 in javareplace method in string in javahow to replace characters in a string javajava replace method operationreplace 2f with in javajava replace valkue in stringsjava string replacereplace strings in javajava replace for 24java string replaceall examplehow to replace a single character in a string in javajava replace a single char in a stringstring replace a character javareplace a string with another string in ajavastring replace in java regexjava replacereplace 26 in javajava message replacerreplace 22 with 27 in javastring replacemnet 7b 7d in javahow to replace a string with another string inside a string in javahow to use replace javahow to replace text in javareplace string element javastr replace 28 29 javahow to use replace function in javajava replace 5breplace character with 40 in javareplace 24 in string javareplace 22 in string javastring method to replacehow to replace a substring in java using replace methodhow to replace the string of 2a 2a 2a in javahow to replace value in javajava string replace 3freplace injavareplace string with another stringreplace 22 28 29 22 in javajava replace a stringreplace func javahow to replace a substring in javareplace a string in another stringhow to replace character in stringreplace specific character in string javareplaing charcters in java stringhow to replace a character in a string with another string in javastring replace charstring replace java string to charreplace all of a certain charector with another java in stringstring replace with 2freplace the characters in a string in javajava replace 2f 2f with 2fhow to change a string javachange string in another method in javasubstring replace string javareplace substring javastr reaplce 28 27e 27 2c 272 27 29 3b in javareplace text javasjava replacejava string replace string with anotherreplace a char from an stringjava how to replace characters in a stringreplace char in string javareplace 22 in string in javadoes java have a replace function for stringsreplace function for strings in javajava replace method fullhow to rplace a charecter in string in javareplace contains string javareplace char in string in javastr reaplce 28 27e 27 2c 272 27 29 3b in java with numerjava replace method stringstring handling method 28replace 29 in javajava replace 5c in stringreplace string java onlinereplace liketstring javajava replace variablereplace letter javareplace in string javahow to replace letters in a string javahow to replace 24 with 5c 5c 24 in javahow to replace value in string javahow to replace a char in string in javareplace method stringreplace 27 3f 27 in stringjava replace 28 29how to use replace in java for stringjava string replace cahracterreplace the heating element in string in javareplace 3ca 3e stringreplace 2f with 5c javahow to replace a character in a string javajava string replace substringreplace method in strings in javareplace value in stringreplace a character in a stringreplace a char in string javahow does the replacall function work in javareplace with in java 2b 3d replace javastring replace in javareplace character in stringhow to replace code in javareplace 5b in string javahow to change string in javachange the string in javastring method for character replacementjava string pattern replacejava substitute stringjava replace 5eahow to over write a given string in javahow to replace a char in a string with anotherhow to replace characters in a stringreplace string value in javawhy i can replace 5c 5c in string in javacreating a method in java using replacejava replace method stirngturn replacer in javajava does string replace modify originalreplacing a string in javastring java replace substringreplace 5btext 5d with string in javahow to replace string in javajava replace 2b in stringreplace things in strings javareplace a character in string in javareplace with different arguments in javareplace 28 29 method in javajava how to replace string textjava how replace 27character replace in javajava replacehow to replace in javajava replace splace in a stringreplace 5c with 2f in java string replace string javahow to replace 22 7b with 7b in javareplace function in java for staringreplace substring in javajava text replacejava replace words in stringreplace charshow to rewrite a string in javajava replace 7b 7d in stringstring replacesubstring replace in javareplace in java works 3freplace 2f in javajava replace string with another stringjava string replace 3fhow to replace a character with 22 22 in javareplace java 27how to repace stringhow to replace parts of a string in javajava replace text in stringreplace parathesis in a string using replace in javareplace 7b in javafind and replace in javapython string replacehwo to replace characters in javahow efficient is replace method in javajava replace 26 by c2 a7string relace javareplace in java how to replace in java