DEV Community

A N M Bazlur Rahman
A N M Bazlur Rahman

Posted on • Originally published at bazlur.com on

How to read texts from a file using java

Reading texts from a file has never been this easy. You have to call Files.readString(), that’s it.

Let’s read a text file, remove all the punctuation from it and then count all the unique words.

100DaysOfProgramming_Day004

for copy/paste pleasure: https://github.com/rokon12/100DaysOfJava/blob/main/src/main/java/com/bazlur/Day005.java

Top comments (0)