Discussion :: Threads - Finding the output (Q.No.16)
|Faten Yahiaoui said: (Feb 3, 2015)|
|Actually the variables x and y haven't been initialized.|
|James said: (Feb 8, 2016)|
|It won't even compile since there is no such keyword as "that".|
|Sahil said: (Jul 28, 2016)|
|x and y are not initialized, so it will give a compilation error.|
|Rochelle said: (Mar 16, 2017)|
|Compilation error because the class implements runnable and it must implements the required method which is public void run().|
|Tom said: (Sep 2, 2017)|
|The second thread might call run() as first.
So "the first thread will complete before the second thread begins." is not always true.
Post your comments here:
Email : (optional)
» Your comments will be displayed only after manual approval.