I want to create race condition in Java thread Concurrency and create deadlock.
 I use ReentrantLock, but it doesn't throw InterruptedException.

It is deadlock now, and I use lockInterruptibly, but it doesn't throw InterruptedException, can any body tell me why?

```
  public class Test {

    public static void main(String[] args) throws InterruptedException {

        final Object o1 = new Object();
        final Object o2 = new Object();

        final ReentrantLock l1 = new ReentrantLock();
        final ReentrantLock l2 = new ReentrantLock();

        Thread t1 = new Thread() {
            public void run() {
                try {
                    l1.lockInterruptibly();
                    System.out.println("I am in t1 step 1 " + o1.toString());
                    Thread.sleep(1000);
                    l2.lock();
                    try {
                        System.out.println("I am in t1 step 2 " + o2.toString());
                    } finally {
                        l2.unlock();
                    }

                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        };

        Thread t2 = new Thread() {
            public void run() {
                try {
                    l2.lockInterruptibly();
                    System.out.println("I am in t2 step 1 " + o2.toString());
                    Thread.sleep(1000);
                    l1.lock();
                    try {
                        System.out.println("I am in t2 step 2 " + o1.toString());
                    } finally {
                        l1.unlock();
                    }
                } catch (InterruptedException e1) {
                    e1.printStackTrace();
                }
            }
        };

        t1.start();
        t2.start();
        Thread.sleep(2000);
        t1.interrupt();
        t2.interrupt();
        t1.join();
        t2.join();

    }
}

```