0

What is the use of thread in java?

Since threads in java also use scheduling(preemptive and time slice) then what is the point of using this as time taken in both the cases will be the same(as per i guess) and also there is no proper order in which they execute(we have to do this explcitly) so why to use threads.

13th Nov 2020, 3:48 PM
Abhishek Dimri
Abhishek Dimri - avatar
1 Answer
+ 3
In java applications code runs line by line but using threads you can run multiple things at the same time. Hope this helps
13th Nov 2020, 3:53 PM
pNK
pNK - avatar