Jump to content

Retirar texto de ficheiro Txt

Recommended Posts


Alguem me pode ajudar, no seguinte caso, tenho um ficheiro txt para abrir e retirar o conteudo desse ficheiro para uma matriz.

O texto no ficheiro esta separado da seguinte forma:



Tenho que retirar tipo Sporting, depois o 9, depois o 6 e assim sucessivamente.

Share this post

Link to post
Share on other sites

Tipo isto?

    String gilVicente = "Gil_Vicente\\9\\5\\2\\2\\17\\";
    String lagartos = "Sporting\\9\\6\\2\\1\\20\\";

    LinkedList<String> list1 = new LinkedList<>(Arrays.asList(gilVicente.split("\\")));
    LinkedList<String> list2 = new LinkedList<>(Arrays.asList(lagartos.split("\\")));

The worst part of censorship is ****

Share this post

Link to post
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.