// Zorah Fung, CSE 142 // Examples of creating a file and using a Scanner to read tokens from // the Scanner import java.io.*; import java.util.*; public class FileDemo { public static void main(String[] args) throws FileNotFoundException { File data = new File("data.txt"); Scanner input = new Scanner(data); String token1 = input.next(); // reads "Madison" String token2 = input.next(); // reads "72" String token3 = input.next(); // reads "Hunter" int token4 = input.nextInt(); // reads 27 as an integer } }