Hi, I'm trying to use the replace() method to take out all instances of " "
, (space) with an underscore, ("_"). I'm doing this because I'm using URLs to connect to a servlet. I keep getting this error:
replace(char,char) in java.lang.String cannot be applied to (java.lang.String,java.lang.String) url.replace(" ", "_");
This is how I wrote my code:
url = url.replace(" ", "_");
What am I doing wrong? Any suggestions would be most welcome.