Introduction
Here is the source code for Main.java
Source
public class Main {
public static void main(String[] argv) throws Exception {
Object o = new Object();
System.out.println(Thread.holdsLock(o));
synchronized (o) {
System.out.println(Thread.holdsLock(o));
}
}
}