Assignemnt #123: Simple File Input

Code

    /// Name: Cassie Rapp
    /// Period: 6
    /// Program Name: Simple File Input
    /// File Name: simple.java
    /// Dtae Finished: 6/9/2016
    
    import java.io.File;
    import java.util.Scanner;
    
    public class simple {
        
        public static void main(String[] args)throws Exception {
            
            String myName;
            
            Scanner name = new Scanner(new File("SimpleFileInput.txt"));
            myName = name.nextLine();
            
            name.close();
            
            System.out.println( "Your name is: " + myName );
            
        }
    }
    

Picture of the output

Assignment 123