I was wondering what happens to opened files/file pointers(Buffered Reader) inside of a function after the function exits?
For example
public void foo(){
String curr;
for (int i = 0; i < 100; i++){
BufferedReader br = new BufferedReader(new FileReader(file_location));
while((curr = br.readLine()) != null){
/* do something */
}
}
}
We must note that I DO NOT close the buffered reader.
Thanks.