42
Definitely.Then its an error question in JDiscuss Test4 for SCJP 1.4 Exam
SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJD, SCEA/OCMJEA
Live life to an interface, not an implementation!
God is inside u<br />Belive him
42
SCJP1.4<br />SCWCD (in progress)
42
The behavior you experience is not guaranteed and may vary between runs (even on the same computer). Polymorphism has nothing to do with which values are printed. You should not depend on the thread scheduler for behavior.So, I don't think it will print "hello" at all. Please explain if this is wrong.
Possibly, but the behavior is still not guaranteed. I say again, do not count on the thread scheduler for behavior.What if we set max priority for Thread t1 will that print hello 5 times?
I think the method you're looking for is setPriority().I just want to know How to set priority for t1 thread.I tried t1.SET_PRIORITY(10); shows error.
wouldn't polymorphism come into play? so the word Hello cannot be printed out correct?
Hang a left on main. Then read this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|