Explanation:
FileReader: This class is used to read the contents of a file as a stream of characters.
BufferedReader: This wraps around the FileReader to efficiently read the text from the file line by line.
try-with-resources: This automatically closes the BufferedReader after the try block is finished, which helps avoid resource leaks.