Created
July 24, 2018 22:44
-
-
Save paullewallencom/6cad1766c53e9b5fa35f7c6940961816 to your computer and use it in GitHub Desktop.
Concatenates text files and outputs the result to a file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Cat | |
{ | |
private Cat() { } | |
public static void main( String[] args ) | |
{ | |
Out out = new Out( args[ args.length - 1 ] ); | |
for ( int i = 0; i < args.length - 1; i++ ) | |
{ | |
In in = new In( args[i] ); | |
String s = in.readAll(); | |
out.println(s); | |
in.close(); | |
} | |
out.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment