import java.io.IOException; class Ex extends Exception {} interface IOCloseable { void close() throws IOException; } interface ExCloseable { void close() throws Ex; } interface NoExCloseable { void close(); } interface TCloseable { void close() throws T; } interface I1 extends AutoCloseable, IOCloseable {} interface I1R extends IOCloseable, AutoCloseable {} interface I2 extends AutoCloseable, IOCloseable, ExCloseable {} interface I3 extends AutoCloseable, NoExCloseable {} interface I3R extends NoExCloseable, AutoCloseable {} interface IT extends AutoCloseable, TCloseable {} class Main { { try (I1 i1 = null) {} try (I1 i11 = null) { } catch (IOException e){} try (I1R i11r = null) { } catch (IOException e){} try (I2 i2 = null) {} try (I2 i21 = null) { } catch (IOException e) {} try (I2 i22 = null) { } catch (Ex e) {} try (I3 i3 = null) {} try (I3R i3r = null) {} try (IT it = null) {} } }