+ 5

Please Explain Me! What is "thread" in JAVA?

I didnt get it till now since 2 months 😢😢😢😢! All you sololearners , please help me 😎😎

27th Nov 2018, 12:31 PM
Bipin Tatkare
Bipin Tatkare - avatar
8 Respuestas
+ 7
Please
2nd Dec 2018, 4:26 AM
Bipin Tatkare
Bipin Tatkare - avatar
+ 4
Didnt get it😣😣😣😣
27th Nov 2018, 1:54 PM
Bipin Tatkare
Bipin Tatkare - avatar
+ 3
thread is where your code running, so in multi-thread your code will run at different place thus it will make both code(or more) able to run at the sametime.
27th Nov 2018, 1:18 PM
Taste
Taste - avatar
+ 3
Think about roads with a few lanes, imagine a car is the code and thread is the lane. By using single thread that means every car/code are using a single lane to run/move. What ever we do the car at the front will always arrive first. By creating a thread, it allows some cars to move at the other lane(s) so they can move and arrive at same time.
27th Nov 2018, 1:58 PM
Taste
Taste - avatar
+ 2
Again same thing........ 😢😢
27th Nov 2018, 2:00 PM
Bipin Tatkare
Bipin Tatkare - avatar
+ 1
Creating Threads allows the later part of the code to be executed first or vice versa i.e. the earlier part of the code can be run simultaneously with the later part
24th Dec 2018, 4:32 PM
Rupankar Roychaudhury
Rupankar Roychaudhury - avatar
0
that is okay but can you write that default code with thread.sleep function . I need to see how and where to implement it
15th Feb 2019, 8:03 AM
yajat anand
yajat anand - avatar