blob: e1041928fe17a14a57ca899506b6bf94588c7047 (
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 (java.io.InputStream in = getClass().getResourceAsStream("ValInTryWithResources.class")) {
final java.io.InputStream i = in;
final int j = in.read();
}
}
}
|