Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { private static final Object SINGLE_SEMAPHORE = new Object(); public static void waitSingle() { synchronized (SINGLE_SEMAPHORE) { try { SINGLE_SEMAPHORE.wait(); } catch (InterruptedException iex) { iex.printStackTrace(); } } } }