1 | class TryWithResources { |
2 | |
3 | void m() throws Exception { |
4 | try ( |
5 | AutoCloseable a1 = newAC(); |
6 | AutoCloseable a2 = newAC(); |
7 | AutoCloseable a3 = newAC();) { |
8 | } |
9 | } |
10 | |
11 | private AutoCloseable newAC() { |
12 | return new java.io.FileReader( |
13 | java.io.FileDescriptor.err); |
14 | } |
15 | |
16 | } |