when I read a book, I saw that there was something I didn"t understand. I"d like to ask. The
code is as follows:
the code in the figure:
try (FileInputStream in = new FileInputStream("./TestDir/build.txt");
FileOutputStream out = new FileOutputStream("./TestDir/subDir/build.txt"))
The book says that this paragraph is written in terms of automatic resource management, and there is no need to close the stream on its own. What does this mean?
We usually write code, but we don"t always end up with
in.close;
out.close;
close the stream?
Why is this place not closed?