Because you called t1.run()
and t2.run()
instead of t1.start()
and t2.start()
.
If you call run
, it's just a normal method call. It doesn't return until it's finished, just like any method. It does not run anything concurrently. There is absolutely nothing special about run
.
start
is the "magic" method that you call to start another thread and call run
in the new thread. (Calling start
is also a normal method call, by the way. It's the code inside start
that does the magic)