I wanna read documents and process them. Each iteration processes one document.
Which kind of code is better?
1.
BufferedReader br;
for(File f : files)
{
br = new BufferedReader(......);
......
}
2.
for(File f : files)
{
BufferedReader br = new BufferedReader(......);
......
}
My point is which one is more efficient in terms of space and speed?