标签:包括 class manage ini targe must 关闭 detail input
参考:https://blog.csdn.net/qq_33543634/article/details/80725899
The try-with-resources statement is a try statement that declares one or more resources. A resource is an object that must be closed after the program is finished with it. The try-with-resources statement ensures that each resource is closed at the end of the statement. Any object that implements java.lang.AutoCloseable, which includes all objects which implement java.io.Closeable, can be used as a resource.
谷歌翻译:
try-with-resources语句是声明一个或多个资源的try语句。 资源是一个对象,程序完成后必须将其关闭。 try-with-resources语句可确保在语句末尾关闭每个资源。 任何实现java.lang.AutoCloseable的对象(包括所有实现java.io.Closeable的对象)都可以用作资源。
//src
public abstract class InputStream implements Closeable {
// MAX_SKIP_BUFFER_SIZE is used to determine the maximum buffer size to
// use when skipping.
private static final int MAX_SKIP_BUFFER_SIZE = 2048;
//...
}
标签:包括 class manage ini targe must 关闭 detail input
原文地址:https://www.cnblogs.com/gyjjj/p/14526507.html