I am reading and then printing this file char by char but now I would like to print 20 chars by 20 chars, incrementig the i value like i+=20 is not what i want.
File fitxer = new File ("C:\\Users\\yuto\\IdeaProjects\\M6-DataAccess\\src\\UF1\\FluxesAndStreams\\A1.java");
FileReader flux = new FileReader (fitxer);
int i;
while ((i = flux.read()) != -1) {
System.out.println((char) i);
}
flux.close();