java - Do I have to close FileInputStream? -


i working trainee in test automation. working creating junit code eclipse , run using eclipse. in retriving datas excel sheet using fileinputstream function.

fileinputstream fi=new fileinputstream("c:\\search.xls"); workbook w=workbook.getworkbook(fi); sheet s=w.getsheet(0); 

is necessary close inputstream function? if please guide me codings.

yes, need close inputstream if want system resources released back.

fileinputstream.close() need.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -