GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — java2python/test/Synchronized0.java at master · OliverKohl/java2python Expand file tree/ Copy pathSynchronized0.javaMore file actions 27 lines (23 loc) · 540 Bytes / Copy pathSynchronized0.javaFile metadata and controls27 lines (23 loc) · 540 Bytes 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 class Synchronized0 { private long c1 = 0; private long c2 = 0; private Object lock1 = new Object(); private Object lock2 = new Object(); public void inc1() { synchronized(lock1) { c1++; } } public void inc2() { synchronized(lock1) { c2++; } } public static void main(String[] args) { Synchronized0 obj = new Synchronized0(); obj.inc1(); obj.inc2(); System.out.println( obj.c1 ); System.out.println( obj.c2 ); } } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |