1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| Compiled from "SynchronizedCounter.java" public class sy.SynchronizedCounter { public sy.SynchronizedCounter(); Code: 0: aload_0 1: invokespecial #1 // Method java/lang/Object."<init>":<>V 4: aload_0 5: iconst_0 6: putfield #7 // Field c:I 9: return
public synchronized void increment(); Code: 0: aload_0 1: dup 2: getfield #7 // Field c:I 5: iconst_1 6: iadd 7: putfield #7 // Field c:I 10: return
public synchronized void decrement(); Code: 0: aload_0 1: dup 2: getfield #7 // Field c:I 5: iconst_1 6: isub 7: putfield #7 // Field c:I 10: return
public synchronized int value(); Code: 0: aload_0 1: getfield #7 // Field c:I 4: ireturn }
|