Originally posted by Sunny:
By the way, any explanation for the yield() and last question?
Given a reference called t to to a class which extends Thread, which of the following will cause it to give up cyclesto allow another thread to execute.1) t.yield();2) yield()3) yield(100) //Or some other suitable amount in milliseconds4) yield(t);Given answer is 2). I thought 1) should be correct answer (I know, yield() is static method of Thread class, but stillyou can access it using reference, right? Correct me if I am wrong. Also the description says yield() is static method ofObject class.)