looking at bytecode

This commit is contained in:
rusefillc 2022-02-13 16:17:05 -05:00
parent dc95bb80fe
commit 6161ca51bd
1 changed files with 20 additions and 0 deletions

View File

@ -22,4 +22,24 @@ public class NativeSynchronizedInvoker {
public static void testNotNativeUnSynchronizedCommPorts() {
System.out.println(SerialPort.getNotNativeUnSynchronizedCommPorts());
}
public void intokeSync() {
iAmSynchronized();
iAmSynchronized2();
iAmNotSynchronized();
}
public synchronized void iAmSynchronized() {
System.out.println("hello");
}
public void iAmSynchronized2() {
synchronized (this) {
System.out.println("hello");
}
}
public void iAmNotSynchronized() {
System.out.println("hello");
}
}