מערכות מידע נושאים מתקדמים בתכנות- עדכני

לחץ כאן לכל השאלות

מה הפלט של תוכנית זו?

1
done
Explanation: Threads t1 & t2 are created by class newthread that is implementing runnable interface, hence both the threads are provided their own run() method specifying the actions to be taken. When constructor of newthread class is called first the run() method of t1 executes than the run method of t2 printing 2 times “false” as both the threads are not equal one is having different priority than other, hence falsefalse is printed.
by
מיין לפי

* השאלה נוספה בתאריך: 20-07-2019