Posts by andeb • 11 points
1 post
-
1
votes6
answers36799
viewsA: How to read a text file in Java?
Using Apache Commons IO, we can do it as follows: String conteudo = IOUtils.toString(new FileInputStream("arquivo.txt")); We can also define the charset which should be used for reading in two ways.…