public static String remove(String seq,char toRemove){
  StringBuilder sb=new StringBuilder();
  for (int i=0; i < seq.length(); i++) {
    final char ch=seq.charAt(i);
    if (ch != toRemove) {
      sb.append(ch);
    }
  }
  return sb.toString();
}

public static String remove ( String seq , char toRemove ) { StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < seq . length ( ) ; i ++ ) { final char ch = seq . charAt ( i ) ; if ( ch != toRemove ) { sb . append ( ch ) ; } } return sb . toString ( ) ; }
removes a character from a string .
