+++ /dev/null
-class Racer implements Runnable {
- int d = 42
-
- public void run () {
- doSomething(1001)
- d = 0 // (1)
- }
-
- static void main (String[] args){
- Racer racer = new Racer()
- Thread t = new Thread(racer)
- t.start()
-
- doSomething(1000)
- int c = 420 / racer.d // (2)
- println c
- }
-
- def doSomething (int n) {
- try {
- Thread.sleep(n)
- } catch (InterruptedException ix) {}
- }
-}