public void foo() throws IOException {
try(Gate gate = new Gate()) {
System.out.println("use gate here");
}
}
public static class Gate
implements Closeable
{
@Override
public void close() throws IOException {
System.out.println("We're closed!");
}
}
Version 2.1 last modified by Geoff Fortytwo on 20/12/2013 at 08:57
Document data
Attachments:
No attachments for this document