Jump to content

Apagar caracteres (bufferedreader/writer)


Recommended Posts

Boas pessoal,

Tenho uma pequena duvida em relação a um método em java

static void removeLetters( BufferedReader orders, BufferedReader in, BufferedWriter out) throws IOException


Este método é suposto percorrer um .txt (in) e verificar os caracteres no txt orders e escrever em outro txt sem os caracteres no orders. Por exemplo no

txt in "Hello World"

txt orders "Ho"

txt out " ell Wrld"  (final)

Eu tenho este codigo


String line;
char[] ords = new char[quantos+1];  // vector do txt orders
     while((line = in.readLine())!= null){ 

A minha duvida é qual a melhor forma de apagar esses caracteres. Já pesquisei no api do java mas não consegui. :S

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.