Hi,

i'm still beginner in java.

Here is my simple question:

if we have two java programs like:
-test1.java which open a file for example.
test2.java which move one file to another directory.

Suppose these two programs are working well separately.

if one day, we want to write just one program, is it possible to do it?

like Test12.java which open a file and move another file to another directory.

Hope to be clear.

thank you

I am still kind of new too but if I am not mistaken, I think you can use a buffer reader to read the contents of one file into a string variable and then use that string to write the contents into the second file. You may also be able to write to second file using the first file as a parameter...not sure how to do it but there might be a way to do that....maybe someone will have a better answer than me...good luck

OR you could just write a third scaffolding file which calls methods from/instantiates test1 and test2 as needed

You can implement this using partial class..

Thank you appolish,

could you direct me towars an example becoze i don't get everything.
thanks