One class calling another class
Hi I am new to this and I hope to be using this forum allot from now on.
My first question is that I created a little java class called ListFiles.class that when I run it gives me a output of a list of files using:
System.out.println(list);
The output looks like this:
C:\Users\Admin\Testing\bkdb.txt
C:\Users\Admin\Testing\FolderOne\FolderTwo\MainTex tFile.txt
C:\Users\Admin\Testing\FolderOne\MainImage.bmp
C:\Users\Admin\Testing\Main_Document.doc
What I want is for a second class (separate file) to use this output and write it to a txt_file.txt, preferably if read the txt_file.txt and if any line already exist then ignore it, only adding new lines.
Is that possible?