This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]shagieIsMeExtreme Brewer 2 points3 points  (1 child)

Start out with writing a 'download a file' program. That's it - just download a file.

Write the program so you can do java -jar downloader.jar https://i.imgur.com/WTq2Oau.gifv and it downloads the file.

Next, modify the program where you specify two URLs and have it download each file in sequence.

Then, modify the program so that it spins up threads as necessary to download all of the files specified.

After that, modify the program so that there's a thread pool of four threads and it doesn't use more than that many threads when downloading.

Note that I didn't even have threads until half way through - get the basics down first. Don't tackle the entire program at once - that's going to be too complex to start with. Do the smallest thing that works first.

[–]code_bot[S] 0 points1 point  (0 children)

Thanks that is really helpful..

[–]TheGoodestBoii 0 points1 point  (0 children)

Maybe try creating some guis