88%(8)7 out of 8 people found this document helpful
This preview shows page 1 - 2 out of 2 pages.
/** To change this license header, choose License Headers in Project Properties.* To change this template file, choose Tools | Templates* and open the template in the editor.*/package email;import java.io.BufferedReader;import java.io.File;import java.io.FileNotFoundException;import java.io.FileReader;import java.io.IOException;import java.util.Scanner;import java.util.logging.Level;import java.util.logging.Logger;/**** @author jason*/public class SDEV425_1 {/*** @param args the command line arguments*/public static void main(String[] args) {// Read the filename from the command line argumentString filename = "EmailAddresses.txt";try {Scanner scan = new Scanner(new File(filename));String fileLine;System.out.println("Email Addresses:");while(scan.hasNext()){fileLine = scan.next();
You've reached the end of your free preview.
Want to read both pages?
Spring '17
main function, Command-line argument, Homework 1 Java Code