You want to load the text inside the file and store it as a string in memory.
Try to write your own load methods. By doing so, you'll learn a lot. If you are stuck, list it here what you have done so far, and I will correct it or will give you more hints or will show you the code that solves your problem. It's really not a big task, my code size for reading a file into a string consists of only 7 lines.
Hwo to do:
For reading a file, you should make a re-usabel method:
"public static String readFileAsString(String sourceFileName) throws IOException"
This method contains source code that uses following classes:
- class File, methods: File(filename), exists()
- class FileInputStream, methods: FileInputStream(name), available(), read (byte[] data)
- class String, methods: new(byte[] data)
- class IOException, methods: IOException(errorMessage)
So read about all these classes and the listed methods in the javadocs. That's all you need for assembling the desired method.