Can somebody help on try with resource in java
try(InputStream inputStream = new FileInputStream(new File(some file)))
{
if(inputStream == null) //Line 3
{
}
}
catch(IOException e)
{
}
I want to know, is it necessary to check null on line 3. Will there be any situation or circumstances where inputStream can be null at line 3 ?