If you are still using jdk6, python2 in your project, I suggest you give up quickly.
Because many serious errors at the beginning of the design are being improved by good programmers, don't be affected by the wrong design.
For example: use try-with-resources is right, try-finally is evil.
In the past, a try-finally statement is a good way to ensure that resources are properly closed, even if the program throws an exception or returns.


God bless you can understand.
^&^
static String firstLineOfFile(String path) throws IOException {
try (BufferedReader br = new BufferedReader(
new FileReader(path))) {
return br.readLine();
}
}