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 -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -