blob: 73f8d1a225cd85b0a760211331e0cf227c6390ba (
plain)
1
2
3
4
5
6
7
8
9
10
|
//version 7
import java.io.IOException;
public class ValInTryWithResources {
public void whyTryInsteadOfCleanup() throws IOException {
try (final java.io.InputStream in = getClass().getResourceAsStream("ValInTryWithResources.class");) {
final java.io.InputStream i = in;
final int j = in.read();
}
}
}
|