package threaddemo;

public class ThreadStateWithSync {

    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(() -> {
            synchronized (ThreadStateWithSync.class) {
                System.out.println("t1 get lock ");
            }
        });

        synchronized (ThreadStateWithSync.class) {
            t1.start();
            Thread.sleep(100L);

            System.out.println(STR."t1 state: \{t1.getState()}");
        }
    }
}
