Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int garantiaDe = 0; // {1,6};
- int paraAcertoDe = 0; // {1,6}
- int cont,i,j;
- List<String[]> lista = new ArrayList<>();
- LerArquivoTxT() {
- this.garantiaDe = garantiaDe;
- this.paraAcertoDe = paraAcertoDe;
- }
- public void LerArquivo() {
- try {
- FileReader fr = new FileReader("C:/Conteudo/lista.txt");
- BufferedReader br = new BufferedReader(fr);
- String str;
- while ((str = br.readLine()) != null) {
- lista.add(str.split(";"));
- }
- } catch (IOException e) {
- out.println("Arquivo não encontrado!");
- } finally {
- //br.close();
- }
- lista.forEach(a -> System.out.println(Arrays.toString(a)));
- }
- public static void main(String[] args){
- LerArquivoTxT lista = new LerArquivoTxT();
- lista.LerArquivo();
- }
Add Comment
Please, Sign In to add comment