View Single Post
Join Date: Oct 2004
Posts: 26
Reputation: SyLk is an unknown quantity at this point 
Solved Threads: 0
SyLk SyLk is offline Offline
Light Poster

how to use scanner correctly

 
0
  #1
Sep 25th, 2008
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
Reply With Quote