Java program to read from a file