```
public class Employee {

public static void main(String[] args) {
   int j=3;
   staples[] stemp = new staples[j];
   String file_name = "d:/personal/11636470/NetBeansProjects/Employee/src/employee/Xanadu.txt";

   throws IOException 

     {

   Scanner s = null;
    try {
        s = new Scanner(
                  new BufferedReader(
                    new FileReader("file_name")));

        while (s.hasNext()) 
        {
            System.out.println(s.next());
        }
        } finally 
        {
        if (s != null) 
            {
             s.close();
            }
        }

 try

 {

 BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));  

 for ( j=0;j<3;j++)
        {
            stemp[j] = new staples();

            System.out.print("Enter your name : ");
            stemp[j].setName(reader.readLine());

            System.out.println("Enter your age : "); 
            stemp[j].setAge(Integer.parseInt(reader.readLine()));

        }

 for ( j=0;j<3;j++)
        {
            System.out.println("Employee number:" + j +" name:"+stemp[j].getName()+" Age:"+stemp[j].getAge() );

        }

 reader.close(); // VERY IMPORTANT TO CLOSE 

 System.out.println("Program ended"); 

 }

 catch(java.io.IOException ex)
 {
     System.out.println("Error is " + ex.getMessage() ); 
 }

}

```

}
}

The problem seems to be simple , i am getting an error in the "throws IOException" line , is there anything wrong with the try and catch method I implemented? 

There are two parts to this code , one is to read the file xanadu.txt and the other is to copy get employee data.Both have try and catch implemetations.