How To Read Text File into String
We read a file in java using the java.io.BufferedReader class.
In the below example we will see how to read a file in java and convert the contents to String object.
File contains this string - Online Psychology Degree, Online Paralegal Degree, Insurances, Domain Names, Interior Design Degree, Bank Loans
Also in Java 7, a utility method is provided which is quiet fast and efficient