how to solve the following
thread question:
Given:
5. class NoGo implements Runnable {
6. private int i;
7. public synchronized void run() {
8. if (i%10 != 0) { i++; }
9. for(int x=0; x<10; x++, i++)
10. { if (x == 4) Thread.yield(); }
11. System.out.print(i + " ");
12. }
13. public static void main(
String [] args) {
14. NoGo n = new NoGo();
15. for(int x=0; x<101; x++) { new Thread(n).start(); }
16. }
17. }
Which is true?
a The output can never contain the value 10.
b The output can never contain the value 30.
c The output can never contain the value 297.
d The output can never contain the value 820.
e The output can never contain the value 1010.