String issues
uhm.. lets say if got a string with a value of "LONDON" and want to delete the "ND" to make it LOON.. how should i go about doing that..
String a ="LONDON"
if(a.contains("ND"){
//what goes here?
}
uhm.. lets say if got a string with a value of "LONDON" and want to delete the "ND" to make it LOON.. how should i go about doing that..
String a ="LONDON"
if(a.contains("ND"){
//what goes here?
}
String has a method to do what you want but as mentioned Strings are immutable so it returns a new String.
String b = a.method();
You will have to look up the method and figure out how it works. If you can't come back here and post your code and explain what you have tried and what isn't working.