0
Run() priority order
Hi ! I made a program in which two classes inherted Thread class and then i made the objects for both these classes and ran the program. The output for the later created obj came first and the output for the first one came out last . So is there any reason behind this ?
1 Antwort
+ 1
By default, every thread you create has same priority(of 5). Since they run in parallel, randomly any one of them can be executed first, even if you run 5 threads or more.