InputStream is = null;
OutputStream os = null;
try {
} catch (IOException e) {
}finally{
try {
if(os!=null){
os.close();
}
if(is!=null){
is.close();
}
} catch (IOException e2) {
}
}
try(
InputStream is = new FileInputStream("...");
OutputStream os = new FileOutputStream("...");
){
}catch (IOException e) {
}
try()里每個聲明的變量類型都必須是Closeable的子類