Quantcast
Channel: Declaring – 100% Private Proxies – Fast, Anonymous, Quality, Unlimited USA Private Proxy!
Viewing all articles
Browse latest Browse all 10

Read input files from args just by declaring their sum and a delay for processing

$
0
0

This is a tricky one for me since I haven’t tried it again.

So I am trying to import a specific number of input text files to my program and specify a delay.
Let me explain:

java -jar program.jar 5 10   

This is just an example since the numbers can vary.
In this example I want to read 5 input files and then pass each one to a method after 10 seconds.

Every input file will be named: input[1…n].txt
input1.txt is passed into a method which does some stuff and then after 10sec input2.txt should enter.

I have no idea how to do this. I understand that I have to look for args[0] files in the directory of the file, but how do I look for input1.txt?

public static void main(String[] args) {         int fileNumber = args[0];         int delay = args[1]         Q2fix ks = new Q2fix(args[0]);         ks.fill();  } 

The post Read input files from args just by declaring their sum and a delay for processing appeared first on 100% Private Proxies - Fast, Anonymous, Quality, Unlimited USA Private Proxy!.


Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>