We are going to read the content of this file using scanning

package ch4_package;
import java.io.*;
import java.util.Scanner;
public class Test_This {
public static void main(String[] args) throws IOException
{
// TODO Auto-generated method stub
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String file_name ="";
Process pp = new Process();
try{
//System.out.println("---While Loop---");
System.out.print("Please Enter a File name: ");
file_name = br.readLine();
//System.out.print("Now the text to be added : ");
//str_text = br.readLine();
pp.read_file(file_name);
}//try
catch(NumberFormatException e)
{ System.out.println("data was blank");}
}
}
class Process {
public void read_file(String str)throws IOException
{
Scanner s = null;
try {
s = new Scanner(new BufferedReader(new FileReader(str)));
while (s.hasNext()) {
System.out.print(s.next()+ " ");
}
}catch (IOException e) { System.out.println("could not read"); }
finally {
if (s != null) {
s.close();
}
}
}
}

Handling error with try-catch-finally block