Try changing every occurance of FileInputStream
to File
and change the directory from a folder to the actual file e.g. "C:\text\text2\file.txt"
. It should get rid of the error and it also should be able to read the file properly
2
solved Unable to use a Scanner to scan over a PDF Document for a specific word [closed]