public static String deleteChar(String fromString,char charToDelete){
  StringBuffer buffer=new StringBuffer(fromString.length());
  for (int i=0; i < fromString.length(); i++) {
    if (fromString.charAt(i) != charToDelete) {
      buffer.append(fromString.charAt(i));
    }
  }
  return new String(buffer);
}

public static String deleteChar ( String fromString , char charToDelete ) { StringBuffer buffer = new StringBuffer ( fromString . length ( ) ) ; for ( int i = 0 ; i < fromString . length ( ) ; i ++ ) { if ( fromString . charAt ( i ) != charToDelete ) { buffer . append ( fromString . charAt ( i ) ) ; } } return new String ( buffer ) ; }
removes all instances of the specified character from the given string .
