inFile error when working with files

When working with data stored on secondary storage, we need to import so as to use class Printwriter and java.util so as to use class compiler gives me an error telling me inFiile cannot be resolved to a class in this statement; static Scanner inFile = new Scanner(new inFile(swt.txt)); where swt.txt is the source of the data on the secondary storage disk

you must be using some thing different here.look at a sample of reading files here Reading Data from Text File in Java | File I/O also drop the entire class of your code here,you can make a pr

@herbert24 thanks so much. have you used the latest version of eclipse? its like i have to first create a Scanner class differently something i am not good at. am a beginner

you could look at the above link i dropped you, it will give you a work round on files, you can use eclipse

Have a look See!!! To first figure out how to use the scanner class.

thankyou the link was helpful now i can get the source of the error i was getting

1 Like

@mherman22 thanks so much.

Kindly drop yo error log at and you can drop your entire class cod there too. Thanks :pray:

Glad to help !!!

Happy coding, happy learning!!!

1 Like