If a thread is to be declared as a daemon thread, it must be declared before a)
ID: 3541462 • Letter: I
Question
- If a thread is to be declared as a daemon thread, it must be declared before
a) start method b) run method c) stop method d) a or b or c e) none - If you declare an object as null, the garbage collector immediately comes into action and frees the memory occupied by the object.
a) True b) False - Mr. Vijay has written an application without using any thread priorities. When he runs the program, does JVM impose any thread priorities on the code ?
a) imposes b) does not impose c) depends on the underlying system d) none - A thread enters the dead state after completing its run method or when stop method is called. The stop method sends a ThreadDeath object on to the thread. The ThreadDeath is a subclass of _______.
a) Exception b) Error c) both and depends on the source code d) none - t1.setPriority(hread.MAX_PRIORITY);
t2.setPriority( Thread.MIN_PRIORITY);
In the above code t1 and t2 are two threads. Imagine only one thread either t1 or t2 runs at a time on the system. The time taken to execute a certain code by t1 is lessor than t2 as t1 is set to more priority than t2.
a) True b) False
Explanation / Answer
b
false
d
a
true
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.