java - the program is throwing exceptions at me when reading from a file -
this question has answer here:
- what backslash character (\\)? 6 answers
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
Post a Comment