Assignemnt #123 Simple File

Code

 /// Name: JJ Deng
    /// Period: 6
    /// Program Name:SimpleFileInput
    /// File Name: SimpleFile.java
    /// Date Finished: 5/28/2016
  
        import java.io.File;
        import java.util.Scanner;
        
        public class SimpleFile {
        
            public static void main(String[] args) throws Exception {
        
                String name;
        
                System.out.print("I have determined that your name is: ");
        
                Scanner fileIn = new Scanner(new File("name.txt"));
        
                name = fileIn.nextLine();
        
                fileIn.close();
        
                System.out.println(name);
            }
        }


    

Picture of the output

Assignment 120