 <p>Because <code>get()</code> is <strong>method</strong> and must be invoked on instance.</p> <pre><code>new B().get(5); new A().get(1); </code></pre> <p>You call it in <code>static main()</code>, which is class <strong>function</strong>.</p> <pre><code>B.exampleFunction(); </code></pre>