/// Name: Lacey Reese
/// Period: 5
/// Program Name: SimpleFileInput
/// File Name: SimpleFileInput.java
/// Date Finished 5/27/2016
import java.io.File;
import java.util.Scanner;
public class SimpleFileInput {
public static void main(String[] args)throws Exception {
String myName;
Scanner name = new Scanner(new File("name.txt"));
myName = name.nextLine();
name.close();
System.out.println( "Your name is: " + myName );
}
}
Picture of the output
//