import java.io.*;
import java.util.*;
class Read
{
    public static void main(String args[])
    {
        try {
        Scanner scan = new Scanner(new java.io.File("textfile.txt"));
        } catch (FileNotFoundException e){
        }        
        while(scan.hasNext()){
        String line = scan.nextLine();
        String[] elements = line.split(",");
        }
    }
}
なぜ私は得るのですか
error: cannot find symbol
        while(scan.hasNext()){
              ^
  symbol:   variable scan
?