So I have to read this file into a linked list, but when I run the code it says unknown source for every scanner.next();
Any idea on how to fix it?
import java.io.File;
import java.io.IOException;
import java.util.LinkedList;
import java.util.Scanner;
public class LinkedMain
{
public static <bankacctinfo> void main(String args[]) throws IOException
{
File fil1 = new File("AcctList");
Scanner scanner = new Scanner(fil1).useDelimiter("[,|\n/\r]+");
LinkedList<BankAcctInfo>list=new LinkedList<BankAcctInfo>();
String nameFirst;
String nameLast;
int pin;
double balance;
while(scanner.hasNext())
{
nameFirst = scanner.next();
nameLast = scanner.next();
pin = scanner.nextInt();
balance = scanner.nextDouble();
BankAcctInfo b1 = new BankAcctInfo(nameFirst, nameLast, pin, balance);
list.add(b1);
}
scanner.close();
}