0
This is my code, but the output is not matching with what I want and is not separating the space or deleting the dots from all lines in the file.
BufferedReader inf = null;
String line;
String ficheiro;
try {
inf = new BufferedReader(new FileReader("musicas.txt"));
while ((line = inf.readLine()) != null) {
String linha = inf.readLine();
System.out.println(line);
String espaco[] = inf.readLine().split(" : ");
for (String sp: espaco) {
System.out.println(sp);
}
}
} catch (IOException e) {}
Please do not use rollback unnecessarily.
– user28595