title: Block actions till list becomes non-empty with java.util.concurrent
body: <p>I need your help. I should use the java.util.concurrent package in my exercise but I don't know how to do it. The question is only about the get method.</p>
  
  <pre><code>public String getInput() {
          if (inputList.isEmpty()) return null;
          String input = inputList.get(0);
          inputList.remove(0);
          return input;
  }
  </code></pre>
  
  <p>How do I need to write the code to wait till the given list (variable: inputList) becomes non-empty?</p>
  
  <p>Greetings</p>