try-with-resources

    5熱度

    3回答

    在Java 7中新的Try-with-Resources語法中,我是否需要擔心資源的順序? try (InputStream in = loadInput(...); // <--- can these be in any order? OutputStream out = createOutput(...)){ copy(in, out); } catch (Except