mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-27 05:54:38 +02:00
21 lines
378 B
Java
21 lines
378 B
Java
|
// Subject to LTW
|
||
|
|
||
|
public class BasicProgram1 {
|
||
|
|
||
|
public static void main(String[] args) {
|
||
|
new BasicProgram1().nonstaticM();
|
||
|
staticM();
|
||
|
}
|
||
|
|
||
|
public static void staticM() {
|
||
|
synchronized (String.class) {
|
||
|
System.err.println("static method running");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void nonstaticM() {
|
||
|
synchronized (this) {
|
||
|
System.err.println("nonstatic method running");
|
||
|
}
|
||
|
}
|
||
|
}
|