Unable to write file into string

in the method import org.apache.commons.io.FileUtils; I tried diff ways to read file but via buffer reader, but went into pmd error, other method using utf 8 , there import is not recognised may anyone tell efficient way of reading file to string.

You can try using readAllBytes method.
https://mkyong.com/java/java-files-readallbytes-example/
Please let me know if it was helpful or not.

Hey, Check this out

And read 5. method

tried every thing but none of filereading helped to solve spot bug, ultimately used module3’s concept and sorted it

2 Likes

that’s nice All the best for next module. :slight_smile:

1 Like

I am still in the same module because my errors have not ended just got one reduced.:frowning: