LockThread { public void tryLcok(final boolean isWait) { for (int i = 0; i <2 ; i++) { new Thread(){ public void run(){ tryLock(Thread.currentThread().getName(),isWait); } }.start();; } }  static void main(String[] args); void tryLcok(final boolean isWait); void userReetrantReadWriterLock(); void userSynchronizedLock(); void useGlobalLock(); void useLocallLock(); void startThreadbyType(final int type);  }
@Test public void testTryLcok() throws Exception { LockThread lockThread=new LockThread(); lockThread.tryLcok(true); }