You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
255 B
17 lines
255 B
10 years ago
|
package pkg;
|
||
|
|
||
|
import java.lang.Override;
|
||
|
import java.lang.Runnable;
|
||
|
|
||
|
public class TestSynchronizedMapping {
|
||
|
public int test(int a) {
|
||
|
synchronized (this) {
|
||
|
return a++;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void test2(String a) {
|
||
|
System.out.println(a);
|
||
|
}
|
||
|
}
|