Problems understanding lower bounds when used with lambda and Functional Interface
<p>While studying up on Java8 Streams, I came across the following code snippet:</p>

<pre><code>Predicate&lt;? super String&gt; predicate = s -&gt; s.startsWith("g");
</code></pre>

<p>Since the generic parameter is a lower bound, I figured this would not compile.  The way I see it, if an Object is a supertype to a String, then passing in an Object type should break it, since Object does not have a startsWith() function.  However, I was surprised to see it work without any problems. </p>

<p>Further yet, when I tweaked the predicate to take an upper bound:</p>

<pre><code>&lt;? extends String&gt;,
</code></pre>

<p>it would not compile.</p>

<p>I thought I understood the meaning of upper and lower bounds, but obviously, I am missing something.  Can anyone help explain why the lower bound works with this lambda?</p>