title: How to pass a Java 8 lambda with a single parameter
body: <p>I want to simply pass a lambda (chunk of code) and execute it when I need to. How do I implement the method <code>executeLambda(...)</code> in the code below (as well what is the method signature):</p>
  
  <pre><code>public static void main(String[] args)
  {
      String value = "Hello World";
      executeLambda(value -&gt; print(value));
  }
  
  public static void print(String value)
  {
      System.out.println(value);
  }
  
  public static void executeLambda(lambda)
  {
      someCode();
      lamda.executeLambdaCode();
      someMoreCode();
  }
  </code></pre>