if (args.length == 0) {
System.err.println("Usage: java FileTyper file1 file2 ...");
return;
}
for (int i = 0; i < args.length; i++) {
try {
typeFile(args[i]);
if (i+1 < args.length) { // more files to type
System.out.println("\n------------------------------------");
}
}
catch (IOException e) {
System.err.println(e);
}
}