Assignment #123 and Simple File Input

Code

    /// Name: Lauren Baird
    /// Period: 7
    /// Program Name: Simple File Input
    /// File Name: SimpleFileInput.java
    /// Date Finished: 3/21/2016
    
    import java.io.File;
    import java.util.Scanner;
    
    public class SimpleFileInput
    {
        public static void main (String[] args) throws Exception
        {
            String name;
            
            System.out.println( "Retrieving information... " );
            
            Scanner fileIn = new Scanner(new File("name.txt"));
            
            name = fileIn.nextLine();
            
            fileIn.close();
            
            System.out.println( "Your name is " + name + "." );
        }
    }  
    

Picture of the output

Assignment #123 Assignment #123