Firstly declare input and inputBuffer before try{}catch(){}
like this
FileReader input = null;
BufferedReader inputBuffer = null;
try
{
------
-------
}
in your first block in the finally : Check below two conditions
if(inputBuffer != null)
{
inputBuffer.close();
}
if(input != null)
{
input.close();
}
Second : if you want more than one resources in the try do this:
try ( OpenDoor door = new OpenDoor(); OpenWindow window = new OpenWindow() )
{
}
No need to close the above resources in finally block in this case.