7 Replies Latest reply: Dec 5, 2008 6:58 AM by 843785 RSS

    Reading from a text file (argument)

      my teacher will be typing this into the command prompt:

      java Project5 sample.txt

      where sample.txt can have any name, but it will be a text file. I've never done any type of input like this...

      my first guess is in my program where i open the main method, i put a parameter like file a or something ie
      public static void main(String[] args, File a) 
      and then just read from File a as you would any file

      is that correct?