File operations in java
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   h_s
Posted On:   Sunday, May 20, 2001 02:18 AM

Hi, I have a question about file operations in java. I have 2 java programs : main program and class program called file_op. 1. Suppose I have three files(file.txt,files1.txt,files2.txt) ,and I want to open any of the files by using argument. ex : javac test open file.txt And The I just called file_op to make the different between file 1 ,file 2 and file 3. My questions are if I use an argument , How can I make a different between the files so It knows what file will be opened. What should I add in my file_op to detect what file will be opened. Do I need to use string tokenizer ,because i have never used string tokenizer? Can you give me an example about that, and also it does not need to use GUI or ap   More>>

Hi,
I have a question about file operations in java. I have 2 java programs : main program and class program called file_op.
1. Suppose I have three files(file.txt,files1.txt,files2.txt) ,and I want to open any of the files by using argument.
ex : javac test open file.txt
And The I just called file_op to make the different between file 1 ,file 2 and file 3.
My questions are if I use an argument , How can I make a different between the files so It knows what file will be opened. What should I add in my file_op
to detect what file will be opened.
Do I need to use string tokenizer ,because i have never used string tokenizer?
Can you give me an example about that, and also it does not need to use GUI or applets to open files.

Another question, If I want to edit the files ,but suddenly I want to undo what I write,so I do not need to save that file.
Are there any examples about that ?

Thank you for your attention and help.

regards,
H S

   <<Less
About | Sitemap | Contact