Assignment #123 and Simple file imput

Code

                        /// Name: Graham Pollock
                        /// Period: 5
                        /// Program Name:  SimpleFileInput
                        /// File Name: SimpleFileInput.java
                        /// Date Finished: 05/29/2016/

     import java.io.File;
    import java.util.Scanner;
    
    public class SimpleFileInput {
        
        public static void main(String []args) throws Exception {
            
            String name1, name2;
            
            Scanner fileIn = new Scanner(new File("name.txt"));
            
            name1 = fileIn.next();
            name2 = fileIn.next();
            
            System.out.println("Your name is " + name1 + " " + name2);
        }
    }
    

Picture of the output

Assignment