scanner class in java
<p>Hey I'm trying to compile the following piece of code to basically read stuff from a file but it refuses to work. it gives me an java.io.FILENOTFOUNDEXCEPTION error at line4. help would be appreciated.</p>

<pre><code> import java.io.*;
 import java.util.*;


 public class test{
    public static void main(String args[]) {
    File fin = new File ("matrix1.txt");
    Scanner scanner = new Scanner(fin);
       while (scanner.hasNextLine()){
       String line = scanner.nextLine();
       System.out.println(line);
       }
    }
 }
</code></pre>
