java - Multiple files argument to main function -


i want process multiple text files ( eg. compare 2 files) , pass files argument main function. how do ? how pass multiple files arguments command line?

import java.io.file; class multifileapp {     public static void main(string[] args) {         // read file 1         // read file 2         //process file 1 & 2     } } 

java yourapp file1.txt file2.txt 

those strings can accessed in main args[0] & args[1].


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -