code: public synchronized Object getInstanceIfFree()
    {
  
      // Check if the pool is empty.
      if (!freeStack.isEmpty())
      {
  
        // Remove object from end of free pool.
        Object result = freeStack.remove(freeStack.size() - 1);
        return result;
      }
  
      return null;
    }
docs: Get an instance of the given object in this pool if available
  
  
  @return an instance of the given object if available or null