[SOLVED] File reading question
Ok, so I got a project to do, and I really don't want to post my code, since well, yeah, its due date is this Monday, and many people of my class can access this site!
So anyway, here's my question:
I got an Object named "Variable" which stores the name of the variable, the data type (in this case can only be int or word, where word works almost like a String) and the value of the variable. While the program runs it stores several Variables in an ArrayList<Variable>. Now, when I exit the program, it writes in a .txt file the entire Variables name, type, and value.
Now, what I'm asked to do in the project is to run the program from the command window. I can do that, BUT I also need to do the following:
Run the program but if I give the following command:
Java P24015.MyShell <filename>
where P24015 is the name of the package and MyShell is the name of the Main class.
The program runs, and stores the entire variable's name, type and value that are in that fileName.txt in the ArrayList<Variable> and I can continue running the program with all of those Variables already stored. What I need to do it is just a "standBy".
I definitely have no idea how to do that. I need info on how to do it, or give me a link where it explains this. I can't find any info on this. Please, any help is greatly appreciated.