Given a reference t to a class which extends
Thread, which of the ff will cause it to give up cycles to allow another thread to execute
1) t.yield();
2) yield()
3) yield (100)
4) yield(t);
the answer given was 2 only
i would think #1 is also a valid answer (if you don't consider the fact that 2 and 3 does not have semi-colons and won't even compile)
since yield is a static method of the Thread class, couldn't it also be called/referenced to by an instance of Thread? and since t extends Thread then x instanceof Thread should return true.
any comments?