you need to use Scanner scan = new Scanner(new File(your_file));
and scan the file using while(scan.hasNext())
. place your counter inside the loop and count the lines
,words
and characters
.
you need to use Scanner scan = new Scanner(new File(your_file));
and scan the file using while(scan.hasNext())
. place your counter inside the loop and count the lines
,words
and characters
.