En la nueva sintaxis Try-with-Resources en Java 7, ¿debo preocuparme por el orden de los recursos?¿Probar con recursos en Java 7?
try (InputStream in = loadInput(...); // <--- can these be in any order?
OutputStream out = createOutput(...)){
copy(in, out);
}
catch (Exception e) {
// Problem reading and writing streams.
// Or problem opening one of them.
// If compound error closing streams occurs, it will be recorded on this exception
// as a "suppressedException".
}
Si los recursos dependen uno del otro *, sí (bueno, "tal vez" depende sobre cómo lo hacen). De otra manera no. –