So, Java 7 came up with the idea of a try-with-resources block feature. Syntax: try(RESOURCE_1; RESOURCE_2;) { //CODE //Closing RESOURCE 1 or 2 is not required. }.
確定! 回上一頁