Discuss, Learn and be Happy דיון בשאלות

help brightness_4 brightness_7 format_textdirection_r_to_l format_textdirection_l_to_r

באיזה שיטה נעשה שימוש במפורש כדי להגדיר את העדיפות של THREAD?

1
done
Explanation: The default value of priority given to a thread is 5 but we can explicitly change that value between the permitted values 1 & 10, this is done by using the method setPriority().
by
מיין לפי

מהו סינכרון בהתייחסות לTHREAD?

1
done
Explanation: When two or more threads need to access the same shared resource, they need some way to ensure that the resource will be used by only one thread at a time, the process by which this is achieved is called synchronization
by
מיין לפי

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

1
mood
Explanation: Although we have not created any object of thread class still we can make a thread pointing to main method, we can refer it by using this.
by
מיין לפי
by Daniel Samira
Daniel Samira 3 נקודות · יותר מ-6 חודשים
מוניטין: 45
.....
by
by Ofek Lutzky
Ofek Lutzky 0 נקודות · יותר מ-6 חודשים
מוניטין: 75
יפה
by
by Itay Razumenko
Itay Razumenko 0 נקודות · יותר מ-6 חודשים
מוניטין: 60
אפשר הסבר בבקשה?
by
by Mark Tseytlin
Mark Tseytlin 3 נקודות · יותר מ-6 חודשים
מוניטין: 203
מה אתה לא רואה ? בתוכנית רשום הדפסה במדויק
by

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

1
done
Explanation: join() method of Thread class waits for thread being called to finish or terminate, but here we have no condition which can terminate the thread, hence code ‘t.join()’ leads to runtime error and nothing will be printed on the screen.
by
מיין לפי
by Omer Laufer
Omer Laufer 0 נקודות · יותר מ-6 חודשים
מוניטין: 1
בגלל הjoin?
by
by נעם שלו
נעם שלו 0 נקודות · יותר מ-6 חודשים
מוניטין: 1
נראלי שכן כי על פניו זה תקין אז יעבור קומפילציה טיפול בזמן ריצה
by
by עמית פרפרה
עמית פרפרה 0 נקודות · יותר מ-6 חודשים
מוניטין: 5
בעיקרון זה תקין, פשוט יווצר deadlock. זה לא זורק שגיאה
by

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

1
done
Explanation: isAlive() method is used to check whether the thread being called is running or not, here thread is the main() method which is running till the program is terminated hence it returns true.
by
מיין לפי

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

1
done
by
מיין לפי

איזו שיטה משמשת למימוש ממשק Runnable?

1
done
Explanation: To implement Runnable interface, a class needs only to implement a single method called run().
by
מיין לפי

איזו שיטה משמשת כדי להתחיל הרצה של Thread?

1
done
by
מיין לפי

איזה מהטענות הבאות שגויה?

1
done
Explanation: run() method is used to define the code that constitutes the new thread, it contains the code to be executed. start() method is used to begin execution of the thread that is execution of run(). run() itself is never used for starting execution of the thread
by
מיין לפי

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

1
done
by
מיין לפי