I am trying to read a file from command line. I have wrote a code where i put my input file line like this.
FileInputStream fis = new FileInputStream("C:/textfile.txt");
Instead i want to give the input file name in command prompt while running the java program. Could anyone help me how to do that? Thanks.