This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am using jdk1.4, but I cannot get this code to work. No compile errors, but runtime errors. any ideas??? Even fooled around with included escape character '\' but no success though I am not good with the \). String replacee = "_"; String replacer = "' OR PersonalDetails.City='"; System.out.println("Replacee is: " + replacee); System.out.println("Replacer is: " + replacer);
city.replaceAll(replacee, replacer); System.out.println(city) //this shows that city was not updated as hoped
Joined: Aug 10, 2001
Still no luck....I even tried removing the "_" and putting "or" instead, so that the code looks like: String replacee = "OR"; String replacer = "' OR City='"; System.out.println("Replacee is: " + replacee); System.out.println("Replacer is: " + replacer);