0

I have a method that create a file:

private void createFile(somedata) {
    try (PrintStream out = new PrintStream(
            new FileOutputStream(someData))) {
        out.print(Data);
               ...
}

And I need call this method 10 times in another method:

 createFile(somedata);
 ...
 createFile(somedata);

Problem:if i debug code - files are created, but if I just run code - only 1-3 files are created, not 10. I can not edit createFile() method. Is there a way to fix this without using delay?

GBlodgett
  • 12,704
  • 4
  • 31
  • 45
Vitalii T
  • 453
  • 3
  • 13

0 Answers0