java - the program is throwing exceptions at me when reading from a file -


this question has answer here:

i have seen answered on others , have tried couldn't find worked me looking help.

    arraylist<integer> integers = new arraylist<integer>();     scanner filescanner = new scanner(new file("workspace\sudoku\file")); 

it keeps giving me error "invalid escape sequence (valid ones \b \t \n \f \r \" \' \\)", file location correct way. think may because using scanner although not 100% sure.

you need escape escape character "\", try this:

scanner filescanner = new scanner(new file("workspace\\sudoku\\file")); 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -