127

Code

    ///Name: Joshua Bautista
    ///Period: 6
    ///Date: 6/4/16
    
    import java.util.Scanner;
    import java.io.File;
    
    public class DAF {
        
        public static void main(String[] args) throws Exception{
            
            Scanner kb = new Scanner(System.in);
            
            String fn;
            System.out.println("What file would you like to scan? ");
            fn = kb.next();
            
            Scanner reader = new Scanner(new File(fn));
            
            while (reader.hasNext()) {
                
                String l = reader.nextLine();
                
                System.out.println(l);
            }
        }
    }
    

Picture of the output

Assignment 1