0

Java:setPriority in thread

Is this code supposed to be print "welcome" first and then the name ? https://code.sololearn.com/cOjZ0jxqanBh/?ref=app

23rd Jun 2021, 3:53 PM
sid
sid - avatar
5 odpowiedzi
+ 3
Ipang Atul so nobody could solve this problem in sololearn right? ☺️☺️. so i cheated the validator with welcome.start(); name.start(); instead of vice versa
23rd Jun 2021, 5:07 PM
sid
sid - avatar
23rd Jun 2021, 4:56 PM
Atul [Inactive]
+ 1
sid you are calling the child class first
23rd Jun 2021, 5:16 PM
Atul [Inactive]
+ 1
Just reverse the order of declaration to get your expected result
23rd Jun 2021, 5:16 PM
Atul [Inactive]