<p>my java application has a loading task which requires two server calls which can be parallelized. So I launch a Thread t1 (doing <strong>task1</strong>) and a Thread t2 (for <strong>task2</strong>).
I want then to do a specific task, <strong>task3</strong> when both other tasks (1 &amp; 2) are over. Naturally I can't tell which of <strong>task1</strong> and <strong>task2</strong> will finish first...</p>

<p>Which would be for you the simplest (and safest) way to code this ?</p>

<p>Thank you for your help</p>

You can
```
join
```
both
```
t1
```
and
```
t2
```
(in either order), then run task3 after the join.