how do i declare a scanner object, filescan publicly so that i may use filescan in varios functions
i found this statement in a forum---->
private static Scanner scanner = new Scanner (1 3 4 4");
when I modified it to----->
public static Scanner filescan = new Scanner(new File("inputdata.txt"));
//declared in the main
i get the following error message
Illegal modifier for parameter scanner; only final is permitted
Thank you guys