i want to replace character '@'
and '.'
to '_'
from my string . I can replace char '.'
to '_'
but cant replace char '@'
.
public String getemailparsing(String email){
String result="";
char keong = 64;
for(int i=0; i<email.length();i++){
if(email.charAt(i) == '@' ){
result = email.replace('@', '_'); //this is NOT working
}else if(email.charAt(i) == '.'){
result = email.replace('.', '_'); //this one is working
}
}
return result;
}
any idea to replace char '@' ...