Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cannot resolve symbol Scanner

807600Jun 28 2007 — edited Jun 28 2007
Hi all,
i am using the Scanner class, while compiling i got an error cannot resolve the symbol Scanner. i checked my j.dk version also and it's 1.6

syntax:

File file = new File(fileName);
Scanner scanner = new Scanner(file);

error:
TextScanner.java:10: cannot resolve symbol
symbol : class Scanner
location: class TextScanner
Scanner scanner = new Scanner(file);

java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing).

any help is appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 26 2007
Added on Jun 28 2007
5 comments
1,157 views